PHP code example of curicows / laravel-seeder-manager
1. Go to this page and download the library: Download curicows/laravel-seeder-manager 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/ */
curicows / laravel-seeder-manager example snippets
class DataSeeder extends Seeder implements SeedDatabase
{
public function getName(): string
{
return 'DataSeeder';
}
public function seed(): void
{
User::create([
'name' => 'Admin',
'email' => '[email protected]',
]);
}
}
class DataManagerSeeder extends Seeder implements ManagerSeeder
{
public function getName(): string
{
return 'DataManagerSeeder';
}
public function getSeeders(): array
{
return [
DataSeeder::class,
];
}
}