PHP code example of bramf / crud-generator

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

    

bramf / crud-generator example snippets


/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not 

/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| Here we will load the environment and create the application instance
| that serves as the central piece of this framework. We'll use this
| application as an "IoC" container and router for this framework.
|
*/

$app = new Laravel\Lumen\Application(
    dirname(__DIR__)
);

$app->withFacades();

$app->withEloquent();

/**
* Controller routes
*/
$router->group(["prefix"=>"api/test"],function() use($router){
    // CRUD
    $router->post("/","TestController@create");
    $router->get("/","TestController@all");
    $router->get("/{id}","TestController@get");
    $router->put("/{id}","TestController@update");
    $router->delete("/{id}","TestController@delete");
});
bash
php artisan migrate
bash
php artisan migrate
bash
php artisan make:crud
bash
php artisan route:list
bash
php artisan make:swagger
bash
php artisan crud:route