File upload form component not working due to fallback on default guard.
Hi! I'm struggling with implementing the File upload form component. The storage driver is configured to Google Cloud Storage using the Spatie library. This all works fine except for a guard issue. When uploading a file in the form the upload process crashes on a non-existing Authentication provider. Debugging this code results in the finding that the upload process automatically falls back on the default guard (web) whereas we using a custom guard for our Admin panel.
Folllowing the stack-trace it seems to be that the guard name is empty when the following function is called:
src/Illuminate/AuthAuthServiceProvider.php#guard()
. This function automatically takes the default driver when no guard name is provided. Changing the guard name in the config from web
to our custom Admin guard indeed works and the upload process is fine. However, this is undesirable. Does someone have a clue why the guard name can be empty? Thanks in advance!
The custom guard is already set correctly on the PanelProvider using the authGuard()
function.0 Replies