add types
This commit is contained in:
1 parent
88b934bda1
commit
e5907fe3a9
46 files changed
+465
-184
No files matched your search
@@ -69,6 +69,8 @@ protected function gate(): void
|
||||
|
||||
/**
|
||||
* 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 @@ protected function dashboards(): array
|
||||
|
||||
/**
|
||||
* Get the tools that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array<int, string>
|
||||
*/
|
||||
public function tools(): array
|
||||
{
|
||||
@@ -111,7 +115,7 @@ public function setupNavigation(): void
|
||||
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 @@ public function setupAssets(): void
|
||||
*/
|
||||
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