1. Go to this page and download the library: Download ranium/laravel-seedonce 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/ */
File: database/seeds/DatabaseSeeder.php
use Illuminate\Database\Seeder;
use Ranium\SeedOnce\Traits\SeedOnce;
class DatabaseSeeder extends Seeder
{
use SeedOnce;
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call(UsersTableSeeder::class);
$this->call(RolesTableSeeder::class);
}
}