empty laravel app
This commit is contained in:
24
app/Providers/AppServiceProvider.php
Normal file
24
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
94
app/Providers/NovaServiceProvider.php
Normal file
94
app/Providers/NovaServiceProvider.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Fortify\Features;
|
||||
use Laravel\Nova\Nova;
|
||||
use Laravel\Nova\NovaApplicationServiceProvider;
|
||||
|
||||
class NovaServiceProvider extends NovaApplicationServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the configurations for Laravel Fortify.
|
||||
*/
|
||||
protected function fortify(): void
|
||||
{
|
||||
Nova::fortify()
|
||||
->features([
|
||||
Features::updatePasswords(),
|
||||
Features::emailVerification(),
|
||||
Features::twoFactorAuthentication(['confirm' => true, 'confirmPassword' => true]),
|
||||
])
|
||||
->register();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the Nova routes.
|
||||
*/
|
||||
protected function routes(): void
|
||||
{
|
||||
Nova::routes()
|
||||
->withAuthenticationRoutes(default: true)
|
||||
->withPasswordResetRoutes()
|
||||
->withEmailVerificationRoutes()
|
||||
->register();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the Nova gate.
|
||||
*
|
||||
* This gate determines who can access Nova in non-local environments.
|
||||
*/
|
||||
protected function gate(): void
|
||||
{
|
||||
Gate::define('viewNova', function (User $user) {
|
||||
return in_array($user->email, [
|
||||
'jonathan@blijnder.nl',
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dashboards that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array<int, \Laravel\Nova\Dashboard>
|
||||
*/
|
||||
protected function dashboards(): array
|
||||
{
|
||||
return [
|
||||
new \App\Nova\Dashboards\Main,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tools that should be listed in the Nova sidebar.
|
||||
*
|
||||
* @return array<int, \Laravel\Nova\Tool>
|
||||
*/
|
||||
public function tools(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
parent::register();
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user