The Laravel framework has a few system requirements. All of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment.
Please follow below steps to install and setup all prerequisites:
In order to use build tools you will need to download and install PHP. If you do not have PHP installed already, you can get it by downloading the package installer from the official website. Please download the stable version of PHP.
Download PHPMake sure you have the Composer installed & running on your computer. If you already have installed Composer on your computer, you can skip this step.
Download ComposerIn order to use build tools you will need to download and install Node.js. If you do not have Node.js installed already, you can get it by downloading the package installer from the official website. Please download the stable version of Node.js (LTS).
Download Node.jsIf you don't have yarn installed on your PC, use the next command npm i -g yarn or sudo npm i -g yarn
| Command | Description |
|---|---|
yarn |
This would install all required dependencies in node_modules folder. |
yarn dev |
Runs the project locally, starts the development server. |
yarn build |
It bundles with production mode. Your app is now ready to be deployed. |
npm comes preinstalled when you install Nodejs
| Command | Description |
|---|---|
npm i |
This would install all required dependencies in node_modules folder. |
npm run dev |
Runs the project locally, starts the development server. |
npm run build |
It bundles with production mode. Your app is now ready to be deployed. |
| Command | Description |
|---|---|
composer i |
This will install all required dependencies in
vendor folder.
|
cp .env.example .env
|
This will copy .env.example as .env file. |
php artisan key:generate
|
This will generate a unique key and write it in your .env file |
php artisan migrate |
This will execute all pending migrations to database. |
php artisan db:seed |
Creates a dummy user into your database for authentication |
php artisan serve |
Runs the project locally, starts the development server on http://127.0.0.1:8000. |