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()
    {
        $this->call(UsersTableSeeder::class);
        $this->call(PostsTableSeeder::class);
        $this->call(ContactsTableSeeder::class);
        DB::table('users')->insert([
             'name' => Str::random(10),
             'email' => Str::random(10).'@gmail.com',
             'password' => Hash::make('password'),
         ]);
         DB::table('posts')->insert([
             'post_id' => 1,
             'post_content' => Str::random(10),
             'post_title' => Str::random(10),
             'post_status'=> Str::random(10),
             'post_name'=> Str::random(10),
             'post_type'=> Str::random(10),
             'post_category'=> Str::random(10),
             'post_date'=> '2020-03-13 12:00', 
         ]);
    }
public function run ( ) { $ this -> call ( UsersTableSeeder :: class ) ; $ this -> call ( PostsTableSeeder :: class ) ; $ this -> call ( ContactsTableSeeder :: class ) ; DB :: table ( 'users' ) -> insert ( [ 'name' => Str :: random ( 10 ) , 'email' => Str :: random ( 10 ) . '@gmail.com' , 'password' => Hash :: make ( 'password' ) , ] ) ; DB :: table ( 'posts' ) -> insert ( [ 'post_id' => 1 , 'post_content' => Str :: random ( 10 ) , 'post_title' => Str :: random ( 10 ) , 'post_status' => Str :: random ( 10 ) , 'post_name' => Str :: random ( 10 ) , 'post_type' => Str :: random ( 10 ) , 'post_category' => Str :: random ( 10 ) , 'post_date' => '2020-03-13 12:00' , ] ) ; }
Run the database seeds.
Run the database seeds .