PHP code example of itskr / skr-laravel

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

    

itskr / skr-laravel example snippets


Skr::check($request->all(),['mobile'=>['

php artisan vendor:publish --provider="Itskr\SkrLaravel\SkrServiceProvider"

    //屏蔽错误日志的打印
    protected $dontReport = [
        \Itskr\SkrLaravel\SkrException::class
    ];
    
    //将系统异常统一转化成系统繁忙
    public function render($request, Exception $exception)
    {
        //系统其他错误直接返回BUSY....可修改
        if (!$exception instanceof \Itskr\SkrLaravel\SkrException){
            return \Itskr\SkrLaravel\Skr::response('BUSY');
        }

        return parent::render($request,$exception);
    }