PHP code example of jaapmoolenaar.nl / crud-generator

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

    

jaapmoolenaar.nl / crud-generator example snippets


    'providers' => [
        ...

        Appzcoder\CrudGenerator\CrudGeneratorServiceProvider::class,
    ],
    

    'providers' => [
        ...

        Collective\Html\HtmlServiceProvider::class,
    ],

    'aliases' => [
        ...

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

    'providers' => [
        ...

        Laracasts\Flash\FlashServiceProvider::class,
    ],

    'aliases' => [
        ...

        'Flash'     => Laracasts\Flash\Flash::class,
    ],
    

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

'extend_layout' => 'layouts.app',

'section_name' => 'sub_content',

'middleware' => 'auth',

    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