Since this VerifyCsrfToken Middleware makes it easy to protect your application from cross-site request forgery (CSRF) attacks. It's not recommended to comment that line, But for testing purpose you can do that.
CSRF tokens are only placed on routes that handle form submissions. I think its likely that you are reading the CSV and saving in the database that doesn't require you to submit a CSRF token, I would recommend to place that route where CSRF token is disabled so it doesn't require you to submit a CSRF token. You can do that by doing something like this.
In your App/Http/Midlleware folder go to VerifyCsrfToken.php and include the specific route to the exception as follows:
* The URIs that should be excluded from CSRF verification.
* @var array
protected $except = [
This will disable the CSRF token requirement for this route only and the error should go away.
Asked in February 2016Viewed 1,832 timesVoted 5Answered 2 times