-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
needs more infoMore information is requiredMore information is required
Description
- Laravel Version: 10.x
- Nova Version: 4.34.3
- PHP Version: 8.2
- Database Driver & Version:
- Operating System and Version: Windows
Description:
Once I add this to novaServiceProvider
Nova::mainMenu(function (Request $request) {
return [
MenuSection::dashboard(User::class)->icon('chart-bar'),
];
});
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Laravel\Nova\Menu\MenuSection;
use Laravel\Nova\Nova;
use Laravel\Nova\NovaApplicationServiceProvider;
use Illuminate\Http\Request;
use App\Nova\User;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
parent::boot();
//Nova::enableRTL();
Nova::initialPath('/resources/users');
Nova::mainMenu(function (Request $request) {
return [
MenuSection::dashboard(User::class)->icon('chart-bar'),
];
});
}
/**
* Register the Nova routes.
*
* @return void
*/
protected function routes()
{
Nova::routes()
->withAuthenticationRoutes()
->withPasswordResetRoutes()
->register();
}
/**
* Register the Nova gate.
*
* This gate determines who can access Nova in non-local environments.
*
* @return void
*/
protected function gate()
{
Gate::define('viewNova', function ($user) {
return in_array($user->email, [
'beshoo@gmail.com'
]);
});
}
/**
* Get the dashboards that should be listed in the Nova sidebar.
*
* @return array
*/
protected function dashboards()
{
return [
new \App\Nova\Dashboards\Main,
];
}
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [];
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
Metadata
Metadata
Assignees
Labels
needs more infoMore information is requiredMore information is required
