PHP code example of mamun / generator

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

    

mamun / generator example snippets


    'providers' => [
        ...

        Appzcoder\CrudGenerator\CrudGeneratorServiceProvider::class,
    ],
    

    'providers' => [
        ...

        Collective\Html\HtmlServiceProvider::class,
    ],

    // Use the lines below for "laravelcollective/html" package otherwise remove it.
    'aliases' => [
        ...

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

Route::resource('posts', 'PostsController');

    php artisan vendor:publish
    

php artisan crud:generate Posts --fields="title:string, body:text"

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 crud:migration posts --schema="title:string, body:text"

php artisan migrate

    php artisan vendor:publish