call other seeder class laravel
#All of them
php artisan db:seed
#One class
php artisan db:seed --class=UserSeeder<?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'),
]);
}
}
Also in PHP:
- check if number doesn't divide exactly by 3 php
- basd64 decrtpy php
- date php D
- add datetime to datetime php
- check at which position php
- base64 dencode GET variables in PHP
- date to timestamp in php
- array key exists php child child nodes
- array_key_exists() WORDPRESS
- convert object to array php
- array_column in php
- find specific word in string php
- Line : 83 -- syntax error, unexpected end of file php
- array_unique array to string conversion
- display errors
- exception handling class php
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes windows
- \r in php
- echo errors of php
- disab;e error reporting php
- add code return block phpstorm
- date function plus 1 day php
- config:clear cache:clear
- explode in php