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

@@ -47,6 +47,11 @@ class BitcoinEvent extends Resource
->toString()));
}
public function subtitle()
{
return __('Erstellt von: :name', ['name' => $this->createdBy->name]);
}
/**
* Get the fields displayed by the resource.
*
@@ -87,14 +92,14 @@ class BitcoinEvent extends Resource
->rules('required', 'string'),
BelongsTo::make(__('Venue'), 'venue', Venue::class)
->searchable(),
->searchable()->showCreateRelationButton()->withSubtitles(),
BelongsTo::make(__('Created By'), 'createdBy', User::class)
->canSee(function ($request) {
return $request->user()
->hasRole('super-admin');
})
->searchable(),
->searchable()->withSubtitles(),
];
}