Set up the Development Environment
The Laravel framework has a few system requirements. Of course, 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.
However, if you are not using Homestead, you will need to make sure your server meets the following requirements:
- PHP >= 7.2.5
- BCMath PHP Extension
- Ctype PHP Extension
- Fileinfo PHP extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
Installation
1. Open up command prompt and navigate to the ubold folder (where you have extracted the folder). E.g.
cd ubold-laravel/ubold
2. Next, run the following commands to install all dependencies
composer install
npm install
3. Now rename the .env.example to .env and modify the values for database in it as per your local environment
4. Run the following command to generate the key
php artisan key:generate
5. Run the following command to run database migration to create tables
php artisan migrate
6. Run the following command to compile all assets
npm run dev
7. And Done, now you are ready to start development server
php artisan server
Open http://127.0.0.1:8000 to see it live there.
Note following commands around the compilation of assets
Command | Description |
---|---|
npm run watch |
For watch files and compiles assets on the fly (also auto reloads browser). |
npm run dev |
For compile assets. |
npm run prod |
For compile and prepare assets for production. |
You can review official laravel documentation for additional configuration and options: Laravel Documentation