LoginSignup
1
0

More than 5 years have passed since last update.

Laravel5.1のCSRFチェックで一部のURLだけ無効化する方法

Posted at
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

class VerifyCsrfToken extends BaseVerifier
{
    /**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [ // ←ここ!!
        '/hoge/{id}',
        '/users',
    ];
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0