IlluminateContractsContainerBindingResolutionException: Target class [admin] does not exist when accessing /admin/users in Laravel with Filament

I’m working on a Laravel 12.17 + Filament v3 project. I installed Filament using:

./vendor/bin/sail artisan filament:install --panels

Then i generated a resource with:

./vendor/bin/sail artisan make:filament-resource User --generate

The admin dashboard loads fine at /admin, but navigating to /admin/users throws the following error:

IlluminateContractsContainerBindingResolutionException Target class
[admin] does not exist.

Here’s what I’ve already checked:

  • I do not have a manual Route::middleware(['admin']) or similar in
    web.php anymore.
  • I verified the generated UserResource.php exists under AppFilamentAdminResources.
  • My AdminPanelProvider.php has the following line:
    ->discoverResources(in: app_path('Filament/Admin/Resources'), for: 'App\Filament\Admin\Resources')

I also ran:

./vendor/bin/sail artisan route:clear
./vendor/bin/sail artisan optimize

Still getting the same error. Any idea what’s causing Laravel to think admin is a missing class?

Also, my http://localhost/admin is running fine but in the nav bar beside it after installing the user panels, the user option to navigate did not show up on the nav bar. I’ve been running into the same issue since yesterday and I can’t figure whats causing this error:

enter image description here