Ejemplo n.º 1
0
 public function run()
 {
     $profiles = [['id' => 1, 'name' => 'Superuser', 'description' => 'Holds all the permissions'], ['id' => 2, 'name' => 'User', 'description' => null]];
     DB::table('profiles')->insert(add_timestamps($profiles));
     //Add all permissions to Superuser profile
     DB::insert('INSERT INTO permission_profile (permission_id, profile_id) SELECT id, 1 FROM permissions');
 }
Ejemplo n.º 2
0
 public function run()
 {
     $users = [['id' => 1, 'username' => 'admin', 'name' => 'Admin', 'password' => Hash::make('secret'), 'profile_id' => 1]];
     DB::table('users')->insert(add_timestamps($users));
 }
Ejemplo n.º 3
0
 public function run()
 {
     $providers = [['id' => 1, 'name' => 'laravel', 'title' => 'Laravel']];
     DB::table('authproviders')->insert(add_timestamps($providers));
 }
Ejemplo n.º 4
0
 public function run()
 {
     $accounts = [['id' => 1, 'uid' => 1, 'nickname' => 'admin', 'name' => 'Admin', 'provider_id' => 1, 'user_id' => 1]];
     DB::table('accounts')->insert(add_timestamps($accounts));
 }