Laravel & NPM installation Steps

  1. 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)
  2. Or Clone the repository from github or your private repo.
    $ git clone <your repo>
  3. Install NPM globally if you haven’t installed that already. for more information please refer this link
  4. After installing NPM globally , run npm install inside your cloned folder, it will download all the required dependencies.
    $ npm install
  5. Install composer to your system and run composer install inside your cloned folder to install all laravel/php dependencies.
    $ composer install
  6. 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.
  7. run command: php artisan key:generate to generate a unique application key.
    $ php artisan key:generate
  8. run command: php artisan passport:keys to generate the required passport keys for authentication.
    $ php artisan passport:keys
  9. 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?

Leave a Reply

Your email address will not be published. Required fields are marked *


8 × = sixteen

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>