1. Go to this page and download the library: Download ooxif/laravel-spec-schema 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/ */
ooxif / laravel-spec-schema example snippets
use Ooxif\LaravelSpecSchema\Blueprint;
Schema::create('table_name', function (Blueprint $table) {
// Blueprint extends Illuminate\Database\Schema\Blueprint.
// add a BINARY column if the driver is MySQL,
// otherwise falls back to default binary().
$table->myBinary('column_name', 8);
// VARBINARY/TINYBLOB/MEDIUMBLOB/LONGBLOB also falls back to default binary().
$table->myVarBinary('column_name', 16);
$table->myTinyBlob('column_name');
$table->myMediumBlob('column_name');
$table->myLongBlob('column_name');
// TINYTEXT falls back to default text().
$table->myTinyText('column_name');
// add `collate`
$table->string('column_name')->collate('utf8_bin');
});