->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

@@ -46,6 +46,11 @@ class Meetup extends Resource
->toString()));
}
public function subtitle()
{
return __('Erstellt von: :name', ['name' => $this->createdBy->name]);
}
/**
* Get the fields displayed by the resource.
*
@@ -68,14 +73,14 @@ class Meetup extends Resource
Text::make('Link')
->rules('required', 'string'),
BelongsTo::make(__('City'), 'city', City::class)->searchable(),
BelongsTo::make(__('City'), 'city', City::class)->searchable()->withSubtitles(),
BelongsTo::make(__('Created By'), 'createdBy', User::class)
->canSee(function ($request) {
return $request->user()
->hasRole('super-admin');
})
->searchable(),
->searchable()->withSubtitles(),
];
}