Giter Club home page Giter Club logo

parking-lot's Introduction

Parking Lot Manager API

REST API Application for managing a Parking Lot using Laravel.


Installation

Please check the official laravel installation guide for server requirements before you start. Official Documentation

Clone the repository

git clone https://github.com/bjulliana/parking-lot.git

Switch to the repo folder

cd parking-lot

Build the image data

docker-compose build

Start up the containers

docker-compose up -d

Install all the dependencies using composer

docker-compose run --rm composer install

Install all the dependencies using npm

docker-compose run --rm npm install

Compile the scss and js files

docker-compose run --rm npm run dev

Copy the example env file and make the required configuration changes in the .env file

cp .env.example .env

Generate a new application key

docker-compose exec php php artisan key:generate

Run the database migrations

docker-compose exec php php artisan migrate

Run the database seeder to create the Parking Lot spaces

docker-compose exec php php artisan db:seed

You can now access the server at http://localhost:8080


Testing API

The api can now be tested using postman at

http://localhost:8080/

Routes

Method URI Parameter Description
GET api/all - Get all tickets.
POST api/tickets - Create new ticket and return the ticket number.
GET api/tickets/{TICKET_NUMBER} - Get the ticket with this number informing the total the customer owes.
POST api/payments/{TICKET_NUMBER} card number required Make a payment for the ticket with the ticket number and a credit card number.
POST api/search str string Run a query search for a ticket number containing the search string.

parking-lot's People

Contributors

bjulliana avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.