database/seeds/ContactTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        Contact::truncate();
            for($i = 1; $i<=20; $i++){
                Contact::create([
                    'name' => "Mau $i",
                    'email' => 'al221910354@gmail.com',
                    'surname' => "Reyes $i",
                    'message'  => "Writing Seeders To generate a seeder, execute the make:seeder Artisan command. All seeders generated by the framework will be placed in the database/seeders directory: php artisan make:seeder UserSeeder A seeder class only contains one method by default: run. This method is called when the db:seed Artisan command is executed. Within the run method, you may insert data into your database however you wish. You may use the query builder to manually insert data or you may use Eloquent model factories. As an example, let's modify the default DatabaseSeeder class and add a database insert statement to the run method:",
                ]);
            }
    }
public function run ( ) { Contact :: truncate ( ) ; for ( $ i = 1 ; $ i <= 20 ; $ i ++ ) { Contact :: create ( [ 'name' => " Mau  $ i " , 'email' => 'al221910354@gmail.com' , 'surname' => " Reyes  $ i " , 'message' => " Writing Seeders To generate a seeder, execute the make:seeder Artisan command. All seeders generated by the framework will be placed in the database/seeders directory: php artisan make:seeder UserSeeder A seeder class only contains one method by default: run. This method is called when the db:seed Artisan command is executed. Within the run method, you may insert data into your database however you wish. You may use the query builder to manually insert data or you may use Eloquent model factories. As an example, let's modify the default DatabaseSeeder class and add a database insert statement to the run method: " , ] ) ; } }
Run the database seeds.
Run the database seeds .