/**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('role_user', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('role_id');
         $table->integer('user_id');
         $table->timestamps();
     });
     $rel = new Role_User();
     $rel->user_id = \Laralum::user('email', env('USER_EMAIL', '*****@*****.**'))->id;
     $rel->role_id = \Laralum::role('name', env('ADMINISTRATOR_ROLE_NAME', 'Administrator'))->id;
     $rel->save();
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('permission_role', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('permission_id');
         $table->integer('role_id');
         $table->timestamps();
     });
     foreach (Laralum::permissions() as $perm) {
         $rel = new Permission_Role();
         $rel->permission_id = \Laralum::permission('id', $perm->id)->id;
         $rel->role_id = \Laralum::role('name', env('ADMINISTRATOR_ROLE_NAME', 'Administrator'))->id;
         $rel->save();
     }
 }
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::create('users_settings', function (Blueprint $table) {
         $table->increments('id');
         $table->integer('default_role');
         $table->boolean('location')->comment = "0: off, 1: on";
         $table->boolean('register_enabled')->comment = "0: off, 1: on";
         $table->integer('default_active')->comment = "0: off, 1: email, 2: on";
         $table->boolean('welcome_email')->comment = "0: off, 1: on";
     });
     $settings = new Users_Settings();
     $settings->default_role = \Laralum::role('name', env('DEFAULT_ROLE_NAME', 'User'))->id;
     $settings->register_enabled = true;
     $settings->default_active = 2;
     $settings->welcome_email = false;
     $settings->location = false;
     $settings->save();
 }