src/database/seeds/RoleUserTableSeeder.php
public function run()
    {
        $source = User::where('email', '=', 'cms@intothesource.com')->first();
        $source_role = Role::where('name', '=', 'source')->first();
        if($source && $source_role){
            DB::table('role_user')->insert([
                'role_id' => $source_role->id,
                'user_id' => $source->id,
                'created_at' => date('c'),
                'updated_at' => date('c')
            ]);
        }
        $admin = User::where('email', '=', 'admin@admin.com')->first();
        $admin_role = Role::where('name', '=', 'admin')->first();
        if($admin && $admin_role){
            DB::table('role_user')->insert([
                'role_id' => $admin_role->id,
                'user_id' => $admin->id,
                'created_at' => date('c'),
                'updated_at' => date('c')
            ]);
        }
    }
public function run()
    {
        $source = User::where('email', '=', 'cms@intothesource.com')->first();
        $source_role = Role::where('name', '=', 'source')->first();
        if($source && $source_role){
            DB::table('role_user')->insert([
                'role_id' => $source_role->id,
                'user_id' => $source->id,
                'created_at' => date('c'),
                'updated_at' => date('c')
            ]);
        }
        $admin = User::where('email', '=', 'admin@admin.com')->first();
        $admin_role = Role::where('name', '=', 'admin')->first();
        if($admin && $admin_role){
            DB::table('role_user')->insert([
                'role_id' => $admin_role->id,
                'user_id' => $admin->id,
                'created_at' => date('c'),
                'updated_at' => date('c')
            ]);
        }
    }
public function run ( ) { $ source = User :: where ( 'email' , '=' , 'cms@intothesource.com' ) -> first ( ) ; $ source_role = Role :: where ( 'name' , '=' , 'source' ) -> first ( ) ; if ( $ source && $ source_role ) { DB :: table ( 'role_user' ) -> insert ( [ 'role_id' => $ source_role -> id , 'user_id' => $ source -> id , 'created_at' => date ( 'c' ) , 'updated_at' => date ( 'c' ) ] ) ; } $ admin = User :: where ( 'email' , '=' , 'admin@admin.com' ) -> first ( ) ; $ admin_role = Role :: where ( 'name' , '=' , 'admin' ) -> first ( ) ; if ( $ admin && $ admin_role ) { DB :: table ( 'role_user' ) -> insert ( [ 'role_id' => $ admin_role -> id , 'user_id' => $ admin -> id , 'created_at' => date ( 'c' ) , 'updated_at' => date ( 'c' ) ] ) ; } }
Run the database seeds.

@return void
Run the database seeds .