database/seeders/SubjectSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $subjects = [
            [
                'name' => 'Programming',
                'slug' => 'programming',
                'created_at' => '2021-02-24 22:34:18',
                'updated_at' => '2021-02-24 22:34:18',
            ],
            [
                'name' => 'Ezoterics',
                'slug' => 'ezoterics',
                'created_at' => '2021-02-24 22:34:18',
                'updated_at' => '2021-02-24 22:34:18',
            ],
            [
                'name' => 'Economics',
                'slug' => 'economics',
                'created_at' => '2021-02-24 22:34:18',
                'updated_at' => '2021-02-24 22:34:18',
            ],
        ];
        Subject::insert($subjects);
    }
public function run ( ) { $ subjects = [ [ 'name' => 'Programming' , 'slug' => 'programming' , 'created_at' => '2021-02-24 22:34:18' , 'updated_at' => '2021-02-24 22:34:18' , ] , [ 'name' => 'Ezoterics' , 'slug' => 'ezoterics' , 'created_at' => '2021-02-24 22:34:18' , 'updated_at' => '2021-02-24 22:34:18' , ] , [ 'name' => 'Economics' , 'slug' => 'economics' , 'created_at' => '2021-02-24 22:34:18' , 'updated_at' => '2021-02-24 22:34:18' , ] , ] ; Subject :: insert ( $ subjects ) ; }
Run the database seeds.
Run the database seeds .