Get laravel CSRF token from outside laravel Get laravel CSRF token from outside laravel laravel laravel

Get laravel CSRF token from outside laravel


You can disable CSRF protection for specific route in VerifyCsrfToken middleware, you will find $protected $except array you can add the routes that will not be checked for CSRF Token

/**     * The URIs that should be excluded from CSRF verification.     *     * @var array     */    protected $except = [        // for example        "form/route"    ];


Create an API endpoint using something like tymondesigns/jwt-auth. You would then request a token first then submit your form to the API endpoint with the token.