Custom filament page route for change password
I created a custom filament page using this https://filamentphp.com/docs/2.x/admin/resources/custom-pages
And added to appserviceprovider boot. I call the Resource URL with the following. I also added the page in the resource getPages().
use Filament\Facades\Filament;
use Filament\Navigation\UserMenuItem;
Filament::serving(function () {
Filament::registerUserMenuItems([
UserMenuItem::make()
->label('Change Password')
->url(UserResource::getUrl('changePassword'))
->icon('heroicon-s-cog'),
]);
});
I get error
Route [filament.resources.users.changePassword] not defined.
How do I register the route?
And added to appserviceprovider boot. I call the Resource URL with the following. I also added the page in the resource getPages().
use Filament\Facades\Filament;
use Filament\Navigation\UserMenuItem;
Filament::serving(function () {
Filament::registerUserMenuItems([
UserMenuItem::make()
->label('Change Password')
->url(UserResource::getUrl('changePassword'))
->icon('heroicon-s-cog'),
]);
});
I get error
Route [filament.resources.users.changePassword] not defined.
How do I register the route?
Filament
The elegant TALL stack admin panel for Laravel artisans.
Solution
Okay I finally got it, it is because I cache the URL, after I clear cache it works.