1. Go to this page and download the library: Download parfumix/laravel-smart-seed 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/ */
parfumix / laravel-smart-seed example snippets
'LaravelSeed\Laravel5SeedServiceProvider',
php artisan smart:install
'providers' => array(
'yaml' => array(
'path' => config_path('seeds/yaml'),
#enter an provider which will create an seed resource and rn
'class' => LaravelSeed\Providers\YamlProvider::class,
#or add closure functions
'run' => function() {
// run all your migrations from provider path
},
'create' => function($source, $class) {
// create an resource seed
}
)
)
# enter an existing provider.
'default' => 'yaml',
bash
php artisan smart:seed create user,page,news
bash
php artisan smart:seed run
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.