for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.5.0).
*
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateLangSwitcherTable extends Migration
{
* Run the migrations.
* @return void
public function up()
$connection=config('lang-switch.database.connection');
if (!Schema::connection($connection)->hasTable('_lang_switcher')) {
Schema::connection($connection)->create('_lang_switcher', function (Blueprint $table) {
$table->increments('id');
$table->string('class', 20)->default('');
$table->string('method', 20)->default('');
$table->string('middleware', 20)->default('');
$table->tinyInteger('enable')->default(1);
$table->index('class', 'class');
$table->index('method', 'method');
$table->index('middleware', 'middleware');
$table->index('enable', 'enable');
});
}
* Reverse the migrations.
public function down()
Schema::connection($connection)->dropIfExists('_lang_switcher');