Mahjoub
Resource as Navigation Parent of Custom page
I am currently trying set a resource page as navigation parent of a custom page. when setting the navigation parent of the custom page by changing the navigation parent property, it simply disappears.
class TimeEntriesOverview extends Page
{
protected static ?string $navigationGroup = 'Zeiterfassung & Ausgaben';
protected static ?string $navigationIcon = 'eos-timer';
protected static ?string $navigationLabel = 'Übersicht Zeiterfassung';
protected static ?int $navigationSort = 1;
protected static ?string $navigationParentItem = 'Zeiterfassung';
protected static string $view = 'filament.pages.time-entries-overview';
}
class TimeEntryResource extends Resource
{
protected static ?string $model = TimeEntry::class;
protected static ?string $navigationGroup = 'Zeiterfassung & Ausgaben';
protected static ?string $navigationIcon = 'eos-timer';
protected static ?string $navigationLabel = 'Zeiterfassung';
protected static ?int $navigationSort = 0;
...
7 replies
use morphOne with select
hey there, i want to use a select with my morphOne relationship.
YouthDepartments and Families are different Models and both have ExternalContacts. For the YouthDepartment, this ExternalContact is the economicManager.
public function contactable()
{
return $this->morphTo();
}
public function economicManager() {
$this->morphOne(ExternalContact::class, 'contactable');
}
I want to display a select with createOption in the YouthDepartments form, but i am stuck on how to implement this. According to the Filament Docs, Select is not compatible with MorphOne1 replies