database/seeds/roleUser.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
    	DB::table('role_user')->delete();
    	$userRole = array(
    		array(
    			'user_id'	=>	1,
    			'role_id'	=>	1,
    		),
    		array(
    			'user_id'	=>	2,
    			'role_id'	=>	2,
    		),
			array(
                'user_id'   =>  3,
                'role_id'   =>  3,
            ),
    	);
    	DB::table('role_user')->insert($userRole);
    }
public function run ( ) { DB :: table ( 'role_user' ) -> delete ( ) ; $ userRole = array ( array ( 'user_id' => 1 , 'role_id' => 1 , ) , array ( 'user_id' => 2 , 'role_id' => 2 , ) , array ( 'user_id' => 3 , 'role_id' => 3 , ) , ) ; DB :: table ( 'role_user' ) -> insert ( $ userRole ) ; }
Run the database seeds.
Run the database seeds .