Skip to content

nixsolutions/laravel-api-boilerplate

Repository files navigation

PHP >= 7+ Build Status Coverage Status Scrutinizer Code Quality License: AGPL v3 Dependency Status

Setup development environment with Homestead (per-project installation)

  1. Clone project

  2. $ composer install;

  3. Setup homestead/vagrant environment:

    ./vendor/bin/homestead make
    

    Remove the following lines from Homestead.yaml if you don't have this SSH keys on your machine (http://laravel.com/docs/5.0/homestead#installation-and-setup):

     authorize: ~/.ssh/id_rsa.pub
     keys:
         - ~/.ssh/id_rsa
    
  4. Generate jwt secret php artisan jwt:secret;

  5. Run vagrant

    vagrant up
    
  6. Under vagrant from project root $ php artisan migrate && php artisan db:seed.

  7. Finally, browse http://192.168.10.10, you should see the main page of application.

Demo

Install json-api demo

To install the json-api demo run the command:

php artisan make:demo 
    {--force : Overwrite existing files by default}

Once it is up and running, go to the following address in your browser:

http://192.168.10.10/api/v1/skills

Testing

To run the tests:

vagrant ssh
cd /vagrant
vendor/bin/phpunit