© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•5mo ago•
1 reply
morkcode

Is there a way to create a resource inside a directory?

I use:
php artisan make:filament-resource -G --soft-deletes --panel=admin Sales\Brand

This creates:
App\Filament\Admin\Resources\Sales\Brands\BrandResource.php ....
With this model App\Models\Sales\Brand.php

If I use:
php artisan make:filament-resource -G --soft-deletes --panel=admin Mydirectory\Sales\Brand --model-namespace=App\Models\Sales

This creates: App\Filament\Admin\Resources\Mydirectory\Sales\Brands\BrandResource.php ....
But the problem is that inside BrandResource.php the Model has an incorrect reference:
...
use App\Models\Sales\Brand\Mydirectory\Sales\Brand;
...

It should be:
use App\Models\Sales\Brand;
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Is there a way to use Heroicons inside HtmlString?
FilamentFFilament / ❓┊help
3y ago
is there a possibility to open create form other resource
FilamentFFilament / ❓┊help
3y ago
is there a way to use tabs inside relationship manager?
FilamentFFilament / ❓┊help
3y ago
Is there a more succinct way of retrieving a count of a resource inside a `ManageRelatedRecords`?
FilamentFFilament / ❓┊help
2y ago