mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
install Laravel Nova
This commit is contained in:
81
app/Providers/NovaServiceProvider.php
Normal file
81
app/Providers/NovaServiceProvider.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Nova\Nova;
|
||||
use Laravel\Nova\NovaApplicationServiceProvider;
|
||||
|
||||
class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, [
|
||||
//
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user