PHP code example of zjwansui / easy_laravel

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

    

zjwansui / easy_laravel example snippets


// controller.php
/**
 * @OA\Info (
 *     title="example-laravel-8.x",
 *     version="1.0"
 * )
 */

 // ModelSaving:
// EventServiceProvider
protected $listen = [

ModelSaving::class => [
//SaveCreator::class, 看情况使用
CheckRules::class,
],]

//app/Http/Kernel.php
// $routeMiddleware 注册

  protected $routeMiddleware = [
        // ...
        'request'=>RegisterRequest::class
    ];

// route
Route::middleware('request')->get('/test',[TestController::class,'test']);