My models live in src/Domain/<Domain>/Models/MyModel - how can I generate a resource?

No matter what I try it doesn't seem to piuck up my model - I've tried the full namespace, I've tried the file path as well and looking at the MakeResourceCommand, it seems like it should work? But I just ends up mincing the $model
4 Replies
Patrick Boivin
Patrick Boivin15mo ago
Your models are in domains, but where are your Filament classes (resources, pages, etc.)? I'm doing the same currently (models in domains) and Filament classes live in the Admin domain.
mochoman
mochomanOP15mo ago
Filament classes are in app/Filament As Filament is an 'application' - much like Http or Console
awcodes
awcodes15mo ago
The filament:make commands have no insight into your applications structure. So the best route is to generate them and move them. PhpStorm is pretty good at updating the namespaces for your when you move things around but you still might have to update them manually.
mochoman
mochomanOP15mo ago
The resources are created in the correct spot, but because my models are not in app/Models, it can't generate the schema or table for me https://github.com/filamentphp/filament/pull/7559 I believe this is realted
Want results from more Discord servers?
Add your server