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;
class AddFieldsToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
Schema::table(config('laravel-acl.authTable'), function (Blueprint $table) {
$table->integer('level_id')->unsigned()->nullable();
$table->index('level_id');
$table->foreign('level_id')->references('id')->on('levels');
});
}
* Reverse the migrations.
public function down()
$table->dropForeign(['level_id']);
$table->dropColumn('level_id');