Laravel 5.5 API that consumes NHTSA API (Link Here), collecting crash ratings and displaying then through an API.
- PHP >= 7.0.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Composer
- Nginx/Apache
You can use the current version of Homestead as well.
Clone this repo into your machine:
git clone https://github.com/mbemvieira/crash-ratings-api
Inside your repo folder, run the following commands:
composer install
cp .env.testing .env
php artisan key:generate
Inside project's folder, you can run PHPUnit tests with:
./vendor/bin/phpunit
GET <APP-HOSTNAME>/vehicles/<MODEL YEAR>/<MANUFACTURER>/<MODEL>
POST <APP-HOSTNAME>/vehicles
GET <APP-HOSTNAME>/vehicles/<MODEL YEAR>/<MANUFACTURER>/<MODEL>?withRating=true