Categories
Laravel

Install Laravel Nova

1 - composer create-project --prefer-dist laravel/laravel admin "5.8.*"


2 - add/update in composer.json the following item
"repositories": [
     {
         "type": "composer",
         "url": "https://nova.laravel.com"
     }
 ],

Next, you may add laravel/nova to your list of required packages in your composer.json file:

"require": {
     "php": "^7.1.3",
     "fideloper/proxy": "^4.0",
     "laravel/framework": "5.8.*",
     "laravel/nova": "~2.0"
 },
3 - php artisan nova:install
4 - php artisan migrate
5- Authorizing Nova in non-local Environment
/**
 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, [
         '[email protected]',
     ]);
 });
 } 
#6 - Deploy with credentials
composer config http-basic.nova.laravel.com [email protected] mxxxxxxxxxxxxxxxxg

Leave a Reply