Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel abort

abort(403);

//You may also provide the exception's message and custom 
//HTTP response headers that should be sent to the browser:
abort(403, 'Unauthorized.', $headers);

abort_if()
//The abort_if function throws an HTTP exception if a given
//boolean expression evaluates to true:

abort_if(! Auth::user()->isAdmin(), 403);

 
PREVIOUS NEXT
Tagged: #laravel #abort
ADD COMMENT
Topic
Name
7+2 =