database/seeds/DatabaseSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        Model::unguard();
        DB::table('user')->truncate();
        DB::table('action')->truncate();
        $left_bar = array();
        $left_bar[] = $this->home();
        $left_bar[] = $this->module1();
        $left_bar[] = $this->module2();
        $left_bar[] = $this->module3();
        $this->testUser();
        $this->testRole();
        $this->test1->role_id = $this->role1->id;
        $this->test2->role_id = $this->role2->id;
        $this->test1->save();
        $this->test2->save();
        $this->action_seed($left_bar);
    }
public function run ( ) { Model :: unguard ( ) ; DB :: table ( 'user' ) -> truncate ( ) ; DB :: table ( 'action' ) -> truncate ( ) ; $ left_bar = array ( ) ; $ left_bar [ ] = $ this -> home ( ) ; $ left_bar [ ] = $ this -> module1 ( ) ; $ left_bar [ ] = $ this -> module2 ( ) ; $ left_bar [ ] = $ this -> module3 ( ) ; $ this -> testUser ( ) ; $ this -> testRole ( ) ; $ this -> test1 -> role_id = $ this -> role1 -> id ; $ this -> test2 -> role_id = $ this -> role2 -> id ; $ this -> test1 -> save ( ) ; $ this -> test2 -> save ( ) ; $ this -> action_seed ( $ left_bar ) ; }
Run the database seeds.
Run the database seeds .
// $this->call('UserTableSeeder');