FilamentF
Filament16mo ago
Patrick

auth()->user() is NULL for loading custom assets with data

Hi there,
I am following this docs: https://filamentphp.com/docs/3.x/support/assets#registering-script-data

Have added my code to AppServiceProvider boot() method, but auth()->user() is always null.

Any ideas?
Solution
Thanks Dennis, I just created a middleware for it and not it works. Did I missed sth in the docs? It says clearly ServiceProvider boot with this example
Was this page helpful?