database/seeds/LikesTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        for($i = 0; $i < 30; $i++){
            Like::create([
                'user_id' => rand(1, 40),
                'book_id' => rand(1, 16)
            ]);
        }
    }
public function run ( ) { for ( $ i = 0 ; $ i < 30 ; $ i ++ ) { Like :: create ( [ 'user_id' => rand ( 1 , 40 ) , 'book_id' => rand ( 1 , 16 ) ] ) ; } }
Run the database seeds.
Run the database seeds .