database/seeders/DatabaseSeeder.php
/**
     * Seed the application's database.
     *
     * @return void
     */
Seed the application's database.
@return void
Seed the application ' s database . @return void
public function run()
    {
        \App\Models\Feature::factory(4)->create();
        \App\Models\Testimonial::factory(5)->create();
        \App\Models\Team::factory(8)->create();
        \App\Models\Contact::factory(1)->create();
        $this->call([
            TitreSeeder::class,
            DeuxiemeSectionSeeder::class,
            NavbarSeeder::class,
            PremiereSectionSeeder::class,
            PhotoSeeder::class,
            RoleSeeder::class,
            FooterSeeder::class,
            ServiceSeeder::class
        ]);
        \App\Models\User::factory(10)->create();
        \App\Models\Portfolio::factory(9)->create();
        DB::table('users')->insert([
            "name" => "Antoine",
            "email" => "antoinedebassompierre@hotmail.com",
            "password" => Hash::make('testtest'),
            "role_id" => 1,
            "created_at" => now()
        ]);
        DB::table('users')->insert([
            "name" => "Jean",
            "email" => "jeandeborsu@email.com",
            "password" => Hash::make('testtest'),
            "role_id" => 1,
            "created_at" => now()
        ]);
        DB::table('users')->insert([
            "name" => "Tom",
            "email" => "tom@email.com",
            "password" => Hash::make('testtest'),
            "role_id" => 2,
            "created_at" => now()
        ]);
        DB::table('users')->insert([
            "name" => "Van",
            "email" => "van@email.com",
            "password" => Hash::make('testtest'),
            "role_id" => 3,
            "created_at" => now()
        ]);
    }
public function run ( ) { \ App \ Models \ Feature :: factory ( 4 ) -> create ( ) ; \ App \ Models \ Testimonial :: factory ( 5 ) -> create ( ) ; \ App \ Models \ Team :: factory ( 8 ) -> create ( ) ; \ App \ Models \ Contact :: factory ( 1 ) -> create ( ) ; $ this -> call ( [ TitreSeeder :: class , DeuxiemeSectionSeeder :: class , NavbarSeeder :: class , PremiereSectionSeeder :: class , PhotoSeeder :: class , RoleSeeder :: class , FooterSeeder :: class , ServiceSeeder :: class ] ) ; \ App \ Models \ User :: factory ( 10 ) -> create ( ) ; \ App \ Models \ Portfolio :: factory ( 9 ) -> create ( ) ; DB :: table ( 'users' ) -> insert ( [ " name " => " Antoine " , " email " => " antoinedebassompierre@hotmail.com " , " password " => Hash :: make ( 'testtest' ) , " role_id " => 1 , " created_at " => now ( ) ] ) ; DB :: table ( 'users' ) -> insert ( [ " name " => " Jean " , " email " => " jeandeborsu@email.com " , " password " => Hash :: make ( 'testtest' ) , " role_id " => 1 , " created_at " => now ( ) ] ) ; DB :: table ( 'users' ) -> insert ( [ " name " => " Tom " , " email " => " tom@email.com " , " password " => Hash :: make ( 'testtest' ) , " role_id " => 2 , " created_at " => now ( ) ] ) ; DB :: table ( 'users' ) -> insert ( [ " name " => " Van " , " email " => " van@email.com " , " password " => Hash :: make ( 'testtest' ) , " role_id " => 3 , " created_at " => now ( ) ] ) ; }
Seed the application's database.
Seed the application ' s database .