->withSubtitles() added

This commit is contained in:
Benjamin Takats
2022-12-17 17:28:46 +01:00
parent ae7426cb1a
commit a932ecc3f0
17 changed files with 234 additions and 173 deletions

View File

@@ -49,6 +49,11 @@ class City extends Resource
->toString()));
}
public function subtitle()
{
return __('Land: :name', ['name' => $this->country->name]);
}
/**
* Get the fields displayed by the resource.
*
@@ -78,7 +83,9 @@ class City extends Resource
->step(0.000001)
->help('<a target="_blank" href="https://www.latlong.net/">https://www.latlong.net/</a>'),
BelongsTo::make(__('Country'), 'country', Country::class),
BelongsTo::make(__('Country'), 'country', Country::class)
->searchable()
->withSubtitles(),
HasMany::make(__('Venues'), 'venues', Venue::class),
@@ -91,7 +98,8 @@ class City extends Resource
return $request->user()
->hasRole('super-admin');
})
->searchable(),
->searchable()
->withSubtitles(),
];
}