mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
committed by
HolgerHatGarKeineNode
parent
a15ca4a2bc
commit
5776b01d15
@@ -36,6 +36,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
@@ -46,12 +47,12 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
$comments = $request->user()
|
||||
->hasRole('super-admin') || $request->user()
|
||||
->can('CommentPolicy.viewAny') ? [
|
||||
MenuSection::make('Comments', [
|
||||
MenuItem::resource(Comment::class),
|
||||
])
|
||||
->icon('chat')
|
||||
->collapsable(),
|
||||
] : [];
|
||||
MenuSection::make('Comments', [
|
||||
MenuItem::resource(Comment::class),
|
||||
])
|
||||
->icon('chat')
|
||||
->collapsable(),
|
||||
] : [];
|
||||
|
||||
$adminItems = $request->user()
|
||||
->hasRole('super-admin') || $request->user()
|
||||
@@ -74,14 +75,14 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
$permissions = $request->user()
|
||||
->hasRole('super-admin') || $request->user()
|
||||
->can('PermissionPolicy.viewAny') ? [
|
||||
MenuSection::make(__('nova-spatie-permissions::lang.sidebar_label'), [
|
||||
MenuItem::link(__('nova-spatie-permissions::lang.sidebar_label_roles'), 'resources/roles'),
|
||||
MenuItem::link(__('nova-spatie-permissions::lang.sidebar_label_permissions'),
|
||||
'resources/permissions'),
|
||||
])
|
||||
->icon('key')
|
||||
->collapsable(),
|
||||
] : [];
|
||||
MenuSection::make(__('nova-spatie-permissions::lang.sidebar_label'), [
|
||||
MenuItem::link(__('nova-spatie-permissions::lang.sidebar_label_roles'), 'resources/roles'),
|
||||
MenuItem::link(__('nova-spatie-permissions::lang.sidebar_label_permissions'),
|
||||
'resources/permissions'),
|
||||
])
|
||||
->icon('key')
|
||||
->collapsable(),
|
||||
] : [];
|
||||
|
||||
return array_merge([
|
||||
MenuSection::dashboard(Main::class)
|
||||
@@ -158,17 +159,17 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
Nova::footer(function ($request) {
|
||||
// return MIT license and date
|
||||
return sprintf("%s %s - %s", date('Y'), config('app.name'), __('MIT License'));
|
||||
return sprintf('%s %s - %s', date('Y'), config('app.name'), __('MIT License'));
|
||||
});
|
||||
|
||||
Nova::userTimezone(function (Request $request) {
|
||||
|
||||
return $request->user()->timezone;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tools that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function tools()
|
||||
@@ -180,6 +181,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
/**
|
||||
* Register the Nova routes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function routes()
|
||||
@@ -192,6 +194,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
@@ -202,6 +205,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
/**
|
||||
* Register the Nova gate.
|
||||
* This gate determines who can access Nova in non-local environments.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function gate()
|
||||
@@ -213,6 +217,7 @@ class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
|
||||
/**
|
||||
* Get the dashboards that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function dashboards()
|
||||
|
||||
Reference in New Issue
Block a user