| Package Data | |
|---|---|
| Maintainer Username: | zedisdog |
| Maintainer Contact: | 2692273254@qq.com (zed) |
| Package Create Date: | 2015-11-15 |
| Package Last Update: | 2022-05-26 |
| Home Page: | |
| Language: | PHP |
| License: | WTFPL |
| Last Refreshed: | 2025-10-27 03:14:47 |
| Package Statistics | |
|---|---|
| Total Downloads: | 68,767 |
| Monthly Downloads: | 248 |
| Daily Downloads: | 1 |
| Total Stars: | 61 |
| Total Watchers: | 2 |
| Total Forks: | 7 |
| Total Open Issues: | 0 |
just extend the original class
Require this package with composer using the following command:
composer require zedisdog/laravel-schema-extend
modify the alias Schema in config/app.php:
'aliases' => [
...
// 'Schema' => Illuminate\Support\Facades\Schema::class,
'Schema' => Jialeo\LaravelSchemaExtend\Schema::class,
],
just modify use statement from
use Illuminate\Support\Facades\Schema;
to
use Jialeo\LaravelSchemaExtend\Schema;
in migrate files.
Schema::create('tests', function ($table) {
//this is alredy built-in.
$table->increments('id')->comment('column comment');
$table->integer('int')->default(1)->length(1);
$table->bigInteger('big')->default(1)->length(1);
$table->smallInteger('small')->default(1)->length(1);
$table->tinyInteger('tiny')->default(1)->length(1);
$table->mediumInteger('medium')->default(1)->length(1);
$table->comment = 'table comment';
$table->autoIncrement = 100;
});
sorry for my bad english