Skip to content

msucevan/laravel-swapi-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

69af115 · Aug 11, 2022

History

9 Commits
Aug 9, 2022
Aug 9, 2022
Aug 11, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 11, 2022
Aug 9, 2022
Aug 9, 2022
Aug 11, 2022
Aug 11, 2022
Aug 11, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022
Aug 9, 2022

Repository files navigation

Build Status License

Laravel Swapi Project

Laravel Swapi Project is an api build to show people and their related planets from SWAPI - The Star Wars API

Installation

Clone the repository in your local enviroment

git clone https://github.com/msucevan/laravel-swapi-project.git

Build the project image

docker build -t laravel-swapi-project . OR docker-compose build

And/or just run

docker-compose up -d

Request the bash console to the application container with the alias name: php

docker exec -it php bash

composer require msucevan\swapi

composer install

Then, run laravel artisan migrations

php artisan migrate

Then, run laravel artisan command to create a new universe

php artisan create-universe

Now this API endpoints are available

http://localhost:8080/people            // Get the list of all people
http://localhost:8080/people/{id}       // Get the details about the person and the details about the related planet

The list is sortable with the parameter ?sort='column'

http://localhost:8080/people?sort=skin_color

The list is filterable by name, gender, eye color and skincolor

http://localhost:8080/people?name=luke
http://localhost:8080/people?gender=male
http://localhost:8080/people?eyecolor=blue
http://localhost:8080/people?skincolor=gold

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published