PHP code example of user11001 / eloquent-model-generator
1. Go to this page and download the library: Download user11001/eloquent-model-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/ */
user11001 / eloquent-model-generator example snippets
use Illuminate\Database\Eloquent\Model;
return [
/*
|--------------------------------------------------------------------------
| Namespace
|--------------------------------------------------------------------------
|
| The default namespace for generated models.
|
*/
'model_namespace' => 'App\Models\Generated',
'trait_namespace' => 'App\Models\Generated\Relations',
/*
|--------------------------------------------------------------------------
| Output Path
|--------------------------------------------------------------------------
|
| Path where the models will be created.
|
*/
'model_path' => 'app/Models/Generated',
'trait_path' => 'app/Models/Generated/Relations',
/*
|--------------------------------------------------------------------------
| Extend Model
|--------------------------------------------------------------------------
|
| Extend the base model.
|
*/
'extend' => Model::class,
];