PHP code example of zero0719 / hyperf-admin

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

    

zero0719 / hyperf-admin example snippets


composer 

php bin/hyperf.php admin:install

'no_check_route' => [
    ['post', '/sessions'],
],

return [
    'http' => [
        \Zero0719\HyperfApi\Middleware\CorsMiddleware::class,
        \Zero0719\HyperfApi\Middleware\RequestLogMiddleware::class,
        \Hyperf\Validation\Middleware\ValidationMiddleware::class
    ],
];

return [
    'handler' => [
        'http' => [
            \Zero0719\HyperfApi\Exception\Handler\ValidationExceptionHandler::class,
            \Zero0719\HyperfApi\Exception\Handler\JWTExceptionHandler::class,
            \Zero0719\HyperfApi\Exception\Handler\ModelNotFoundExceptionHandler::class,
            \Zero0719\HyperfApi\Exception\Handler\BusinessExceptionHandler::class,
            \Zero0719\HyperfApi\Exception\Handler\AppExceptionHandler::class,
            Hyperf\HttpServer\Exception\Handler\HttpExceptionHandler::class,
            App\Exception\Handler\AppExceptionHandler::class,
        ],
    ],
];