PHP code example of aiiro / laravel-factory-generator

1. Go to this page and download the library: Download aiiro/laravel-factory-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/ */

    

aiiro / laravel-factory-generator example snippets

 shell
php artisan vendor:publish --provider="Aiiro\Factory\FactoryGeneratorServiceProvider"
 php


return [
    
    /**
     * Set the namespace of the model.
     */
    'namespace' => [
        'model' => 'App',
    ],

    /**
     * List of the columns that will not appear in the factory.
     */
    'ignored_columns' => [
        'id',
    ],
];
 shell
php artisan generate:factory some_samples