PHP code example of airondev / laravel-seeder-generator
1. Go to this page and download the library: Download airondev/laravel-seeder-generator 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/ */
airondev / laravel-seeder-generator example snippets
'providers' => [
// Other Service Providers
Airondev\SeederGenerator\SeederGeneratorServiceProvider::class,
],
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class UsersSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
// Your data here
]);
}
}
bash
php artisan vendor:publish --tag=config
bash
php artisan make:seeders
bash
php artisan vendor:publish --tag=stubs
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.