PHP code example of biliboobrian / lumen-angular-code-generator
1. Go to this page and download the library: Download biliboobrian/lumen-angular-code-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/ */
biliboobrian / lumen-angular-code-generator example snippets
$app->register(biliboobrian\lumenAngularCodeGenerator\Provider\GeneratorServiceProvider::class);
'lumen_model_namespace' => 'App\Models',
'lumen_ctrl_namespace' => 'App\Http\Controllers',
'base_class_lumen_model_name' => \biliboobrian\lumenAngularCodeGenerator\Model\MicroServiceExtendModel::class,
'base_class_lumen_ctrl_name' => \biliboobrian\lumenAngularCodeGenerator\Controller\CrudExtendController::class,
'lumen_model_output_path' => app_path() . '/Models',
'lumen_ctrl_output_path' => app_path() . '/Http/Controllers',
'no_timestamps' => null,
'date_format' => null,
'connection' => null,
'add_route' => null,
'add_cache' => null,
//for full tables retrieve
$router->get( '/model', 'ModelController@index');
//for paginated tables retrieve
$router->get( '/model', 'ModelController@get');
$router->get( '/model/{id}/{relation}', 'ModelController@getRelationList');
$router->get( '/model/{id}', 'ModelController@show');
$router->post( '/model', 'ModelController@store');
$router->put( '/model/{id}', 'ModelController@update');
$router->delete('/model/{id}', 'ModelController@destroy');