Laravel & NPM installation Steps
- Create a new laravel project.
$ composer create-project --prefer-dist laravel/laravel my-project
(NOTE: if you do not have composer, please install in your machine and make it global.
This will make a lot easier)
- Or Clone the repository from github or your private repo.
$ git clone <your repo>
- Install NPM globally if you haven’t installed that already. for more information please refer this link
- After installing NPM globally , run npm install inside your cloned folder, it will download all the required dependencies.
$ npm install
- Install composer to your system and run composer install inside your cloned folder to install all laravel/php dependencies.
$ composer install
- Create an .env file by running the following command: cp .env.example .env. Or alternately you can just copy .env.example file to the same folder and re-name it to .env.
- run command: php artisan key:generate to generate a unique application key.
$ php artisan key:generate
- run command: php artisan passport:keys to generate the required passport keys for authentication.
$ php artisan passport:keys
- Open the link to the domain in the browser (Example: https://demo.craterapp.com) and complete the installation wizard as directed.
To simplified, do below 5 steps for get Laravel with NPM modules such as Vue JS.
$ npm install
$ composer install
$ cp .env.example .env
$ php artisan key:generate
$ php artisan passport:keys
By Keenlio, July 15, 2020
What do you think?