Laravel 5 host application for matthew-james/quicksilver
Switch branches/tags
Nothing to show
Clone or download
Matt Allan
Matt Allan update readme
Latest commit 5713d5b Dec 7, 2015
Permalink
Failed to load latest commit information.
app add customer:create and delivery:pickup console commands. Dec 7, 2015
bootstrap Init Nov 19, 2015
config Init Nov 19, 2015
database Init Nov 19, 2015
public Init Nov 19, 2015
resources Init Nov 19, 2015
storage Init Nov 19, 2015
tests Init Nov 19, 2015
.env.example Init Nov 19, 2015
.gitattributes Init Nov 19, 2015
.gitignore Init Nov 19, 2015
artisan Init Nov 19, 2015
composer.json Init Nov 19, 2015
composer.lock add customer:create and delivery:pickup console commands. Dec 7, 2015
gulpfile.js Init Nov 19, 2015
package.json Init Nov 19, 2015
phpspec.yml Init Nov 19, 2015
phpunit.xml Init Nov 19, 2015
readme.md update readme Dec 7, 2015
server.php Init Nov 19, 2015

readme.md

Laravel Quicksilver

This repo is a Laravel 5 host application for matthew-james/quicksilver, a demo application to demonstrate hexagonal architecture.

Setup

composer install
touch database/database.sqlite
php artisan migrate
php artisan customer:create

Using The App

Run php artisan serve to start the built in webserver.

Create a Delivery

Console
php artisan delivery:create 'Tyler Durden' '555 Paper St' 'Chicago' 'IL' '30303' 'Joey Ramone' '222 Michigan Ave' 'Chicago' 'IL' '99922' 'STANDARD'
Rest API

Endpoint:

POST http://localhost:8000/delivery

{
    "pickup_name": "Tyler Durden",
    "pickup_street": "555 Paper St",
    "pickup_city": "chicago",
    "pickup_state": "IL",
    "pickup_post_code": "66043",
    "dropoff_name": "Joey Ramone",
    "dropoff_street": "222 Michigan Ave",
    "dropoff_city": "chicago",
    "dropoff_state": "IL",
    "dropoff_post_code": "99922",
    "priority": "STANDARD"
}

Pickup a Delivery

Console
php artisan delivery:pickup {id}
Rest API
PATCH http://localhost:8000/delivery/{id}

{
    "status": "PICKED_UP"
}

Dropoff a Delivery

Console
php artisan delivery:deliver {id} {signature}
Rest API
PATCH http://localhost:8000/delivery/{id}

{
    "status": "DELIVERED",
    "signature": "Joey Ramone"
}