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
greenlightfolder 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
https://github.com/greenroomgit/greenlight.gitto your greenlight folder
composer install(needs composer to be installed)
php artisan key:generatefrom command line (project root, generates a key for the .env file)
php artisan migrate --seed(project root, creates tables and foreign connections and imports starting seed data)
composer dump-autoloadin case of migration error, then migrate again
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.
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