The GreenLight Development Kit is a Laravel instance ready to start working with GreenLight. Its installation process is similar to what any other Laravel project would have, with the difference of having to provide an instance of the GreenLight package to it as well.

The DevKit project expects to have a greenlight folder one level higher than the project root, containing any version of GreenLight you are working on. In case this instance can not be found, composer will install the package using the packagist repository and place the package into the vendor folder. This would make it impossible to develop the package using version control, so make sure you have GreenLight set up prior installing the DevKit!

The recommended folder structure for local development is:

+-- Your development root folder 
|   +-- greenlight
|   +-- greenlight-devkit

GreenLight setup

  1. Clone the GreenLight package from GitHub: to your greenlight folder
  2. Check your desired branch out (for 1.x, please check the v1 documentation as the Development Kit had a different working method)

Development Kit Setup

  1. Clone the Devkit project from GitHub:
  2. Set write permissions for the following directories: storage & bootstrap/cache
  3. Create an empty database with utf8mb4_general_ci collation
  4. Copy .env.example to .env and set all the database-related parameters. Also, consider editing the SITE parameter
  5. Run composer install (needs composer to be installed)
  6. Run php artisan key:generate from command line (project root, generates a key for the .env file)
  7. Run php artisan migrate --seed (project root, creates tables and foreign connections and imports starting seed data)
  8. Run composer dump-autoload in case of migration error, then migrate again
  9. Run php artisan storage:link (setting up storage symlinks)


Since GreenLight 2.x this structure is utilised by the use of a symlink applied by composer. As a result, GreenLight is not part of the Development Kit repository (and will not be installed to the vendor folder either).

Actually, you could add new features to GreenLight without installing the Development Kit. However, it is always recommended to check functionality in a working environment before drafting a new release. The main purpose of this DevKit is to avoid recreating Laravel instances for testing purposes every time a feature is to be added.

Testing, running in local environments

Run php artisan serve to start your project on your local host.

To check your fresh project out, visit http://localhost:8000.

By default the HTTP-server will listen to port 8000. However if that port is already in use or you wish to serve multiple applications this way, you might want to specify what port to use. Just add the --port argument:

php artisan serve --port=8080