add types
This commit is contained in:
@@ -69,6 +69,8 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
/**
|
||||
* Get the dashboards that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array<int, \App\Nova\Dashboards\Main>
|
||||
*/
|
||||
protected function dashboards(): array
|
||||
{
|
||||
@@ -79,6 +81,8 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
/**
|
||||
* Get the tools that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function tools(): array
|
||||
{
|
||||
@@ -111,7 +115,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
public function setupUserNavigation(): void
|
||||
{
|
||||
Nova::userMenu(function (Request $request, Menu $menu) {
|
||||
$menu->prepend(MenuItem::make(__('My Profile'), $request->user()->profilePage()));
|
||||
$menu->prepend(MenuItem::make(__('My Profile'), $request->user()?->profilePage()));
|
||||
|
||||
return $menu;
|
||||
});
|
||||
@@ -138,7 +142,9 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
*/
|
||||
public function setupFieldMacros(): void
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
Date::macro('toTurkmenFormat', fn () => $this->displayUsing(fn ($value) => $value?->format('d.m.Y')));
|
||||
// @phpstan-ignore-next-line
|
||||
DateTime::macro('turkmenDateTime', fn () => $this->displayUsing(fn ($value) => $value?->format('H:i, d.m.Y')));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user