class VerifyCsrfToken (View source)
InteractsWithTime |
protected Application | $app | The application instance. | |
protected Encrypter | $encrypter | The encrypter implementation. | |
protected array | $except | The URIs that should be excluded from CSRF verification. |
int | secondsUntil(DateTimeInterface|DateInterval|int $delay) Get the number of seconds until the given DateTime. | from InteractsWithTime |
int | availableAt(DateTimeInterface|DateInterval|int $delay) Get the "available at" UNIX timestamp. | from InteractsWithTime |
DateTimeInterface|int | parseDateInterval(DateTimeInterface|DateInterval|int $delay) If the given value is an interval, convert it to a DateTime instance. | from InteractsWithTime |
int | currentTime() Get the current system time as a UNIX timestamp. | from InteractsWithTime |
void | __construct(Application $app, Encrypter $encrypter) Create a new middleware instance. | |
mixed | handle(Request $request, Closure $next) Handle an incoming request. | |
bool | isReading(Request $request) Determine if the HTTP request uses a ‘read’ verb. | |
bool | runningUnitTests() Determine if the application is running unit tests. | |
bool | inExceptArray(Request $request) Determine if the request has a URI that should pass through CSRF verification. | |
bool | tokensMatch(Request $request) Determine if the session and input CSRF tokens match. | |
string | getTokenFromRequest(Request $request) Get the CSRF token from the request. | |
Response | addCookieToResponse(Request $request, Response $response) Add the CSRF token to the response cookies. |
Get the number of seconds until the given DateTime.
Get the "available at" UNIX timestamp.
If the given value is an interval, convert it to a DateTime instance.
Get the current system time as a UNIX timestamp.
Create a new middleware instance.
Determine if the HTTP request uses a ‘read’ verb.
Determine if the application is running unit tests.
Determine if the request has a URI that should pass through CSRF verification.
Determine if the session and input CSRF tokens match.
Get the CSRF token from the request.
Add the CSRF token to the response cookies.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.5/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.html