Moving specific Resource for a different panel
In my Admin Panel there is a resource called UserResource, and I want to move this to the resource path for my moderator panel, however I get an error, see attached images.
I have tried the 'composer dump-autoload' & 'php artisan optimze:clear'
5 Replies
I tried the other posted recently
https://discord.com/channels/883083792112300104/1169729866430689443
Where it said to just move the files and update the namespaces but now I get this error which is at the vendors folder
I tried to error the same commands 'composer dump-autoload', 'php artisan optimize:clear' and 'php artisan cache:clear'
Solution
You need to adjust any use statements in all your classes too.
This is why I love phpStorm
Same
Damn, Thank you, I found the mistake, I thought the
use Filament\Resources\Pages\CreateRecord;
use Filament\Resources\Pages\EditRecord;
use Filament\Resources\Pages\ListRecords;
Should also be adjusted to
use Filament\Moderator\Resources\Pages\CreateRecord;
use Filament\Moderator\Resources\Pages\EditRecord;
use Filament\Moderator\Resources\Pages\ListRecords;
Thank you, I thought I'd give up and start from scratch!