Illuminate\Contracts\Container\BindingResolutionExceptionTarget class [universal] does not exist.

I have a small problem that when I try to log into the filament admin panel I get this, taking into account that I just installed it for a new project Target class [universal] does not exist.
Solution:
I did it again from scratch and it worked, maybe I made a bad configuration of my tenancy
Jump to solution
26 Replies
Dennis Koch
Dennis Koch6mo ago
Can you share the flare exception? Sound like you are using a universal middleware or something that doesn’t exist
Laravel dev
Laravel devOP6mo ago
I literally did what the documentation asks for, I watch videos about it and it doesn't give them this error, but they use Laravel 10.* I use Laravel 11 since this project requires a tenancy structure
No description
Laravel dev
Laravel devOP6mo ago
The login tab works, only the tab when you log in does not work
Dennis Koch
Dennis Koch6mo ago
So I guess the issue isn’t Filament but you multi tenancy setup? I guess you are using stancl/tenancy?
Laravel dev
Laravel devOP6mo ago
yes
Dennis Koch
Dennis Koch6mo ago
Did you enable UniversalRoutes?
Laravel dev
Laravel devOP6mo ago
The issue is that I want to use subdomains due to the project requirement, not a universal route, could it be done that way with filament?
Dennis Koch
Dennis Koch6mo ago
You still need the universal routes for Livewire I think. You still have subdomains.
Laravel dev
Laravel devOP6mo ago
No, I have already configured the tenancy issue, the only thing missing is the part of the administration panel that would be for creating new tenants, and managing them there, from the main domain, and I was thinking of doing it with filament
Dennis Koch
Dennis Koch6mo ago
The error sounds like you are using the universal middleware without enabling the feature. Are you using the universal middleware anywhere?
Laravel dev
Laravel devOP6mo ago
nop no, I have not used or enabled the universal path theme
Dennis Koch
Dennis Koch6mo ago
But it seems to be used somewhere. Did you search your code base for universal?
Laravel dev
Laravel devOP6mo ago
it is not allowed 'features' => [ // Stancl\Tenancy\Features\UserImpersonation::class, // Stancl\Tenancy\Features\TelescopeTags::class, // Stancl\Tenancy\Features\UniversalRoutes::class, // Stancl\Tenancy\Features\TenantConfig::class, // https://tenancyforlaravel.com/docs/v3/features/tenant-config // Stancl\Tenancy\Features\CrossDomainRedirect::class, // https://tenancyforlaravel.com/docs/v3/features/cross-domain-redirect // Stancl\Tenancy\Features\ViteBundler::class, ], Without filament the subdomains and main domains work correctly, but the issue is that when I want to use filament, when I start the session I get that error, or else I would have to do everything manually
Laravel dev
Laravel devOP6mo ago
Here it works wonderfully, but when starting the session it is the issue
No description
Laravel dev
Laravel devOP6mo ago
try { $reflector = new ReflectionClass($concrete); } catch (ReflectionException $e) { throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); } this part that shows the error
Dennis Koch
Dennis Koch6mo ago
So what happens if you enable that feature?
Laravel dev
Laravel devOP6mo ago
If I enable it, nothing changes, in the error, it would only work on the main domain, instead of several subdomains Is it possible to work with Laravel tenancy? or are they not combatable?
Dennis Koch
Dennis Koch6mo ago
It is definetly possible. Probably just some misconfiguration It should work if you follow the steps for the Livewire configuration. Someone did a write up but I cannot find it right now.
Laravel dev
Laravel devOP6mo ago
but according to the livewire documentation I followed it and it worked only on the livewire and the breeze correctly, but when it came to using filament it only gave me an error
Dennis Koch
Dennis Koch6mo ago
Did you adjust anything for Filament itself? Because Filament isn't just Livewire, but the same setup rules need to be done there too. E.g. middlewares etc.
Laravel dev
Laravel devOP6mo ago
No, in fact I didn't adjust anything when installing filament, I had first installed livewire and followed its documentation in Laravel tenancy, but I didn't edit anything about filament because nothing came out of it <?php use Illuminate\Support\Facades\Route; // routes/web.php, api.php or any other central route files you have foreach (config('tenancy.central_domains') as $domain) { Route::domain($domain)->group(function () { //imprimir vista welcome Route::get('/', function () { return view('welcome'); }); }); } To work on the main domain it should be like this, is there something that is put in web route?
Dennis Koch
Dennis Koch6mo ago
Oh you only want on central domain? No then I don’t think you need to do that
Laravel dev
Laravel devOP6mo ago
Now it doesn't even work well with breeze, it gives the same error the only thing that works with is jetstream @Dennis Koch thanks for your time bro, I was able to solve the error now
Solution
Laravel dev
Laravel dev6mo ago
I did it again from scratch and it worked, maybe I made a bad configuration of my tenancy
Dennis Koch
Dennis Koch6mo ago
Glad you figured it out.
Want results from more Discord servers?
Add your server