PHP code example of cornelisonc / famous-user-seeder
1. Go to this page and download the library: Download cornelisonc/famous-user-seeder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cornelisonc / famous-user-seeder example snippets
namespace Database\Seeders;
use Cornelisonc\FamousUserSeeder\NicCage;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$nicCage = new NicCage();
Db::table('users')->insert(
$nicCage->get(
50,
[
'fullName',
'email',
'password'
]
)
);
}
}