laramab/crudgenerator

Basic laravel crud generator.

1.0.7 2020-06-05 09:52 UTC

This package is auto-updated.

Last update: 2024-05-16 13:43:53 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Output The basic laravel crud generator.

Installation

composer require laramab/crudgenerator

Add crud generator service provider

Laramab\Crudgenerator\CrudGeneratorServiceProvider::class,

Published configuration

php artisan vendor:publish --provider="Laramab\Crudgenerator\CrudGeneratorServiceProvider"

it will generate crud-generator.php configuration file which is allow you can custom your own route, model, migration and controller directory

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Model directory
    |--------------------------------------------------------------------------
    |
    | This value is the name of your application. This value is used when the
    | framework needs to place the application's name in a notification or
    | any other location as required by the application or its packages.
    |
    */
    'path_model' => 'app/Models',
    /*
    |--------------------------------------------------------------------------
    | Controller directory
    |--------------------------------------------------------------------------
    |
    | This value is the name of your application. This value is used when the
    | framework needs to place the application's name in a notification or
    | any other location as required by the application or its packages.
    |
    */
    'path_controller' => 'app/Http/Controllers/Frontend',
    /*
    |--------------------------------------------------------------------------
    | Route directory
    |--------------------------------------------------------------------------
    |
    | This value is the name of your application. This value is used when the
    | framework needs to place the application's name in a notification or
    | any other location as required by the application or its packages.
    |
    */
    'path_route' => 'routes/Backend',
    /*
    |--------------------------------------------------------------------------
    | Request directory
    |--------------------------------------------------------------------------
    |
    | This value is the name of your application. This value is used when the
    | framework needs to place the application's name in a notification or
    | any other location as required by the application or its packages.
    |
    */
    'path_request' => 'app/Http/Requests',
];

Example command

php artisan crud:generator Gender "ភេទ" "gender" "name_km:string, name_en:string"