PHP code example of zedisdog / laravel-schema-extend

1. Go to this page and download the library: Download zedisdog/laravel-schema-extend library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zedisdog / laravel-schema-extend example snippets


'aliases' => [
    ...
    // 'Schema' => Illuminate\Support\Facades\Schema::class,
    'Schema'    => Jialeo\LaravelSchemaExtend\Schema::class,
],

use Illuminate\Support\Facades\Schema;

use Jialeo\LaravelSchemaExtend\Schema;

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;
});