From ecdfb0b4b9c19cc6da49013bfc9f06c6a52d2860 Mon Sep 17 00:00:00 2001 From: Benjamin Takats Date: Tue, 29 Nov 2022 20:57:17 +0100 Subject: [PATCH] add Nova license --- .blueprint | 6 +-- .gitignore | 1 - app/Providers/NovaServiceProvider.php | 53 +++++++++++++-------------- auth.json | 8 ++++ 4 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 auth.json diff --git a/.blueprint b/.blueprint index 5117652f..378b2351 100644 --- a/.blueprint +++ b/.blueprint @@ -2,9 +2,9 @@ created: - database/factories/CountryFactory.php - database/factories/CityFactory.php - database/factories/LecturerFactory.php - - database/migrations/2022_11_29_194626_create_countries_table.php - - database/migrations/2022_11_29_194627_create_cities_table.php - - database/migrations/2022_11_29_194628_create_lecturers_table.php + - database/migrations/2022_11_29_195043_create_countries_table.php + - database/migrations/2022_11_29_195044_create_cities_table.php + - database/migrations/2022_11_29_195045_create_lecturers_table.php - app/Models/Country.php - app/Models/City.php - app/Models/Lecturer.php diff --git a/.gitignore b/.gitignore index f0d10af6..2853c34f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ .phpunit.result.cache Homestead.json Homestead.yaml -auth.json npm-debug.log yarn-error.log /.fleet diff --git a/app/Providers/NovaServiceProvider.php b/app/Providers/NovaServiceProvider.php index 429c6c2a..96658c8a 100644 --- a/app/Providers/NovaServiceProvider.php +++ b/app/Providers/NovaServiceProvider.php @@ -10,32 +10,50 @@ class NovaServiceProvider extends NovaApplicationServiceProvider { /** * Bootstrap any application services. - * * @return void */ public function boot() { parent::boot(); + // login with user id 1, if we are in local environment + if (app()->environment('local')) { + auth()->loginUsingId(1); + } + } + + /** + * Get the tools that should be listed in the Nova sidebar. + * @return array + */ + public function tools() + { + return []; } /** * Register the Nova routes. - * * @return void */ protected function routes() { Nova::routes() - ->withAuthenticationRoutes() - ->withPasswordResetRoutes() - ->register(); + ->withAuthenticationRoutes() + ->withPasswordResetRoutes() + ->register(); + } + + /** + * Register any application services. + * @return void + */ + public function register() + { + // } /** * Register the Nova gate. - * * This gate determines who can access Nova in non-local environments. - * * @return void */ protected function gate() @@ -49,7 +67,6 @@ class NovaServiceProvider extends NovaApplicationServiceProvider /** * Get the dashboards that should be listed in the Nova sidebar. - * * @return array */ protected function dashboards() @@ -58,24 +75,4 @@ class NovaServiceProvider extends NovaApplicationServiceProvider 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() - { - // - } } diff --git a/auth.json b/auth.json new file mode 100644 index 00000000..c293b03f --- /dev/null +++ b/auth.json @@ -0,0 +1,8 @@ +{ + "http-basic": { + "nova.laravel.com": { + "username": "bt@affekt.de", + "password": "oMylVXkZYtTFa67zyhKAfKjXrKgxw5mBvRb4IbwgTqYvDySYzK" + } + } +}