How do I check the current route the user is on?
This used to work previously, but stopped after I ran composer update.
if (request()->route()->getName() == 'filament.admin.resources.courses.view') {
return [
RelationManagers\PreferencesRelationManager::class,
];
} else {
return [];
}
It says "Call to a member function getName() on null"
3 Replies