VerifyCsrfToken
class VerifyCsrfToken (View source)
Properties
protected Application | $app | The application instance. | |
protected Encrypter | $encrypter | The encrypter implementation. | |
protected array | $except | The URIs that should be excluded from CSRF verification. |
Methods
void | __construct(Application $app, Encrypter $encrypter) Create a new middleware instance. | |
mixed | handle(Request $request, Closure $next) Handle an incoming request. | |
bool | shouldPassThrough(Request $request) Determine if the request has a URI that should pass through CSRF verification. | |
bool | runningUnitTests() Determine if the application is running unit tests. | |
bool | tokensMatch(Request $request) Determine if the session and input CSRF tokens match. | |
Response | addCookieToResponse(Request $request, Response $response) Add the CSRF token to the response cookies. | |
bool | isReading(Request $request) Determine if the HTTP request uses a ‘read’ verb. |
Details
void __construct(Application $app, Encrypter $encrypter)
Create a new middleware instance.
protected bool shouldPassThrough(Request $request)
Determine if the request has a URI that should pass through CSRF verification.
protected bool runningUnitTests()
Determine if the application is running unit tests.
protected bool tokensMatch(Request $request)
Determine if the session and input CSRF tokens match.
protected Response addCookieToResponse(Request $request, Response $response)
Add the CSRF token to the response cookies.
protected bool isReading(Request $request)
Determine if the HTTP request uses a ‘read’ verb.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.html