andyphung
I got the expiration error for Filament Form and could not figure out
I fixed it.
my route is for 'admin' middleware but Livewire uses Web middleware. So by adding Web middleware to the route. I fixed it.
Route::get('admins/create', [CreateAdmin::class, '__invoke'])->name('filament.admin.resources.admins.create')->middleware(['web', 'admin']);
Those who have a similar issue can refer to it.
livewire update route at Livewire\Mechanisms\HandleRequests;
function boot()
{
app($this::class)->setUpdateRoute(function ($handle) {
return Route::post('/livewire/update', $handle)->middleware('web');
});
$this->skipRequestPayloadTamperingMiddleware();
}
Thanks all for your help
12 replies
I got the expiration error for Filament Form and could not figure out
I can log in normally. Other pages that are not related to filament are fine.
Only pages that link to filament get this.
I doubted the problem relates to livewire/csrf but could not figure it out. Also, no hidden input for form (method) in Filament.
12 replies
Hi all
I solved it by commenting out the default dashboard page and using my custom page
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages')
->pages([
//Pages\Dashboard::class, <=====here
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\Filament\Widgets')
6 replies