billmn

Experience

63,300

0 Best Reply Awards

  • Member Since 3 Years Ago
  • 798 Lessons Completed
  • 3 Favorites

27th May, 2015

billmn left a reply on [L5] Avoiding CSRF Middleware On API POST Routes • 2 years ago

@Mashauri Yep but my post refers to Laravel 5.0 and not 5.1

Now that I have upgraded my application to L 5.1 I've used the 'except' property and works fine

3rd February, 2015

billmn left a reply on [L5] Avoiding CSRF Middleware On API POST Routes • 2 years ago

With latest updates you can avoid CSRF on API working on VerifyCsrfToken class in App\Http\Middleware ( https://github.com/laravel/laravel/blob/develop/app/Http/Middleware/VerifyCsrfToken.php )

In the handle method you can check:

public function handle($request, Closure $next)
{
    if ( ! $request->is('api/*'))
    {
        return parent::handle($request, $next);
    }

    return $next($request);
}
Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.