Git Product home page Git Product logo

pizza-backend's Introduction

PizzaWorld Backend

This repository represents the backend side of the application PizzaWorld. A project the shows pizza list for guests and allow them to make orders.

Project Setup

  1. Clone the repository into the desired location
git clone https://github.com/majebry/pizza-backend.git
  1. cd into the created folder to install composer packages
cd pizza-backend && composer install
  1. Create .env file from .env.example

  2. Generate an application key

php artisan key:generate
  1. Create a database for your project and update the following database connection configurations inside .env
DB_HOST=
DB_PORT=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
  1. Migrate and seed the database, in order to get a list of pizzas and an admin user to login
php artisan migrate --seed
  1. This project uses laravel/passport for admin authentication, so you need to install passport
php artisan passport:install

Once you get this command output copy the Client ID and the Client secret for the Password grant client and update them in your .env file

PASSPORT_CLIENT_ID=
PASSPORT_CLIENT_SECRET=
  1. You need to also run the following command in order to create a public symbolic link to the application storage. This will allow guests to see pizza photos
php artisan storage:link

Usage

You can login as an admin (in order to view the order history) with the following credentials

Tests

Before you run the tests, duplicate your .env file to .env.testing

Update the following values in .env.testing

DB_CONNECTION=sqlite
DB_DATABASE=:memory:

Now you can run the tests:

./vendor/bin/phpunit

pizza-backend's People

Contributors

majebry avatar

Stargazers

Rida Omar avatar

Watchers

James Cloos avatar  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.