app/Exceptions/Handler.php
/**
     * Register the exception handling callbacks for the application.
     *
     * @return void
     */
Register the exception handling callbacks for the application.
@return void
Register the exception handling callbacks for the application . @return void
public function register()
    {
        $this->reportable(function (Throwable $e) {
        });
        $this->renderable(function (InvalidParameterException $e, $request) {
            if ($request->is('api/*')) {
                return response()->json([
                    'message' => $e->getMessage(),
                ], $e->getCode());
            }
        });
        $this->renderable(function (ValidationException $e, $request) {
            if ($request->is('api/*')) {
                return response()->json([
                    'message' => $e->errors(),
                ], 400);
            }
        });
    }
public function register ( ) { $ this -> reportable ( function ( Throwable $ e ) { } ) ; $ this -> renderable ( function ( InvalidParameterException $ e , $ request ) { if ( $ request -> is ( 'api/*' ) ) { return response ( ) -> json ( [ 'message' => $ e -> getMessage ( ) , ] , $ e -> getCode ( ) ) ; } } ) ; $ this -> renderable ( function ( ValidationException $ e , $ request ) { if ( $ request -> is ( 'api/*' ) ) { return response ( ) -> json ( [ 'message' => $ e -> errors ( ) , ] , 400 ) ; } } ) ; }
Register the exception handling callbacks for the application.
Register the exception handling callbacks for the application .
//