This is a RESTful API built with Laravel that allows users to manage a parking lot. It provides endpoints for creating new entrances, completing exits, and checking parking status.
You will need the following technologies to continue developing in this repository.
- Docker
- Docker Compose
- Clone the repository:
git clone [email protected]:alelopez07/parking_lot.git // with ssh
cd parking-lot-api
- Create a .env file:
cp .env.example .env
- Run the genesis.sh script if you want to go back to genesis in your container system and then, run initialize.sh to initialize the docker containers:
bash ./genesis.sh
bash ./initialize.sh
- Install the dependencies:
docker-compose exec app composer install
- Initialize migrations, run migrations and seeders:
docker exec -it app php artisan migrate:install
docker exec -it app php artisan migrate
docker exec -it app php artisan migrate --seed
To start the local development server, in your web browser, visit http://localhost/ to verify that the app is running.
You can see a better detail of the API routes described below exposed in the postman document. click here to get the postman document.
GET|HEAD / .......................................
POST api/v1/entrance/complete ................ v1\ParkingLotController@completeEntrance
POST api/v1/entrance/new ..................... v1\ParkingLotController@createNewEntrance
POST api/v1/generateReport ................... v1\ParkingLotController@generateResidentsPaymentReport
GET|HEAD api/v1/initMonth ........................ v1\ParkingLotController@initMonth
POST api/v1/login ............................ v1\AuthController@authentication
GET|HEAD api/v1/logout ........................... v1\AuthController@logout
POST api/v1/register ......................... v1\UserController@createUser
POST api/v1/vehicle_type/{id} ................ v1\VehicleController@createVehicleType
POST api/v1/vehicle_type/{id} ................ v1\VehicleController@newVehicle
GET|HEAD api/v1/vehicle_types .................... JsonResponse(VehicleType::all(), Response::HTTP_OK)
This API is structured under the following layers:
- Models
- Controllers
- Repositories
- Interfaces
- Providers
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT © JorgeLopez