PHP code example of shopex / luban-crud-generator

1. Go to this page and download the library: Download shopex/luban-crud-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/ */

    

shopex / luban-crud-generator example snippets



    public function register()
    {
        if ($this->app->environment() == 'local') {
            $this->app->register('Appzcoder\CrudGenerator\CrudGeneratorServiceProvider');
        }
    }
    

    'providers' => [
        ...

        Collective\Html\HtmlServiceProvider::class,
    ],

    'aliases' => [
        ...

        'Form' => Collective\Html\FormFacade::class,
        'HTML' => Collective\Html\HtmlFacade::class,
    ],
    

Route::resource('posts', 'PostsController');
composer dump-autoload

    php artisan vendor:publish --provider="Appzcoder\CrudGenerator\CrudGeneratorServiceProvider"
    

php artisan crud:controller PostsController --crud-name=posts --model-name=Post --view-path="directory" --route-group=admin

php artisan crud:model Post --fillable="['title', 'body']"

php artisan migrate

    php artisan vendor:publish --provider="Appzcoder\CrudGenerator\CrudGeneratorServiceProvider"