bezhanSalleh / filament-language-switch

A versatile and user-friendly plugin designed for Filament Panels.
MIT License
210 stars 45 forks source link

fix register-middleware #14

Closed medeiroz closed 1 year ago

medeiroz commented 1 year ago

Problem

Service provider works in a different way for laravel serve and laravel octane laravel serve to register service provider everytime. because each request do a complete bootstrap. But octane once time (on startup application).

The middleware should be register once time on bootstrap application

Solution

Moved the register middleware to ServiceProvider

Notes

I tested with laravel serve and laravel octane with and without register migration on config/filament.php