artisan seed
#All of them
php artisan db:seed
#One class
php artisan db:seed --class=UserSeederphp artisan make:seeder NameOfTheSeeder<?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
'name' => Str::random(10),
'email' => Str::random(10).'@gmail.com',
'password' => Hash::make('password'),
]);
}
}php artisan migrate:fresh --seedphp artisan make:seeder UserSeeder
Also in PHP:
- NAME OF YOUR FORM in contact form 7
- creating laravel project
- check if array contains a key php
- cakephp life cycle
- AWS HTTP error: SSL operation failed with code 1.
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/assignment1/actions/db.php on line 2
- find string exist in string php
- <?php if ( is_home()
- create seeder laravel
- enable tab completion in terraform
- class in php
- base encode64 php
- date('I')
- enable the cache mechanisms laravel
- How do you clear cache in Laravel?
- create database seeder in laravel
- clear storage laravel
- base64 decode in php
- check string exist in php
- enable reporting php
- count length of a string
- PHP terminal Console in Your Browser
- codeigniter 4 database seed multiple
- PHP copy table from one database to another