PHP code example of macropay-solutions / laravel-crud-wizard-generator

1. Go to this page and download the library: Download macropay-solutions/laravel-crud-wizard-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/ */

    

macropay-solutions / laravel-crud-wizard-generator example snippets


if (\env('APP_ENV') === 'local') {
    $app->register(\MacropaySolutions\LaravelCrudWizardGenerator\LaravelCrudWizardGeneratorServiceProvider::class);
}
 php artisan vendor:publish --provider="MacropaySolutions\LaravelCrudWizardGenerator\LaravelCrudWizardGeneratorServiceProvider" 
 php artisan make:api-resource {resourceName} {--decorated} {--table=} {--connection=} {--composed} {--connectionAsModelFolder}
bash
php artisan make:api-resource products --decorated

Created Model: /var/www/html/project/app/Models/Product.php
Created ModelAttributes: /var/www/html/project/app/Models/Attributes/ProductAttributes.php
Created Service: /var/www/html/project/app/Services/ProductsService.php
Created Controller: /var/www/html/project/app/Http/Controllers/ProductsController.php
Created Decorator: /var/www/html/project/app/Decorators/ProductDecorator.php
Created Middleware: /var/www/html/project/app/Http/Middleware/Decorators/ProductsMiddleware.php
---------------------------------------------------------------------------------------------
TODO:
- Fill the Model's properties and relations,
- Fill the ModelAttributes' dock-block property types,
- Fill the ModelRelations' dock-block property-reads,
- Define validations and DbCrudMap in Controller
- Fill the Decorator,
- Register Middleware decorator as route middleware,
- Use the middleware alias as middleware in your crud route definition for each method.
- Expose resource in DbCrudMap::MODEL_FQN_TO_CONTROLLER_MAP.
---------------------------------------------------------------------------------------------
Thank you for using laravel-crud-wizard-generator
For more details see: https://github.com/macropay-solutions/laravel-crud-wizard-generator
For full cruFd suite: https://laravel-crud-wizard.com