Skip to content

Installation

Max edited this page Apr 1, 2019 · 19 revisions

Setting Up

You can (and should) set this up in exactly the same way as laravel. The minimal installation steps for local development are outlined below, and you should consult the Laravel documentation for comprehensive Laravel configuration options.

Note that this boilerplate does not support Lumen.

When setting up the project for the first time, please execute the following commands:

composer install
composer run post-root-package-install
php artisan key:generate
php artisan jwt:secret
php artisan ide-helper:generate

Additionally, please carry out the following steps:

  • Remove the composer.lock from the .gitignore file

Extra Configuration

This boilerplate adds several additional configuration files you should be aware of;

  • api.php - Dingo API Configuration
  • jwt.php - Tymon JWT Configuration
  • stubs.php - This loads custom API stubs for certain artisan generators

It is not necessary to modify them during installation, but you should familiarise yourself with them - just in case you need to change some relevant configurations later.

CORS

You have two options in terms of how to deal with CORS. You should choose one, depending on what you prefer.

Add CORS headers to your web-server config

You can add the CORS header configuration to your apache/nginx config for this project. There are example apache and nginx vhost/site files in this project's docs directory which demonstrate how to do this.

Add the CORS package for laravel

Add and install the following package once you are set up:

It will handle CORS for you.