Laravel +11 how to set validateCsrfToken dinamically

<?php namespace App\Providers; use Illuminate\Contracts\Foundation\Application;
use Illuminate\Foundation\Http\Middleware\ValidateCsrfToken;
use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider
{ /** * Register any application services. */ public function register(): void { // } /** * Bootstrap any application services. */ public function boot(): void { // here we can use any value from env() or config() ValidateCsrfToken::except('*'); }
} 
Enter fullscreen mode
Exit fullscreen mode

Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
How to optimize your wordpress website for mobile users in 2023 : a comprehensive guide. These guidelines explain how to make web content accessible to people with a wide array of disabilities.