Using this api, you can get menu from available, unexpired foods and order food
To use this api, you must already have php and mysql installed on your system
First clone the code or download it.Then you need to do the following steps.
- Open the .env file and enter your database settings.(you can copy from env.example) These settings are as follows. DB_CONNECTION = mysql DB_HOST = 127.0.0.1 DB_PORT = 3306 DB_DATABASE = snapp_food DB_USERNAME = root DB_PASSWORD =
- Then you need to install dependencies with composer install && composer dump-autoload
- Then you need to create project tables with the php artisan migrate command in your database
- then you should install passport on laravel php artisan passport:install
- Then you need to fill data to your tables with php artisan db:seed
- after db:seed, 51 users will created, one of them is root user with following information
- email: root@root.com
- name: root
- password: r00t@Root
- Then you can run the project with the php artisan serve command.
- You can also get the list of api urls with the php artisan route:list command
- You can see test files in path: tests/Features
- You can run test with this command: tests/Features
- I use docker, you can use with following steps:
- first you have already installed docker
- cd /path/to/laravel-clone-project
- cp .env.example .env
- chmod -R 0777 storage
- chmod -R 0777 bootstrap/cache
- docker-compose build
- docker run --rm -it --volume $(pwd):/app sample_php composer install
- docker run --rm -it --volume $(pwd):/app sample_php php artisan key:generate
- Replace sample_php with your project image name.
- docker-compose up -d
- docker-compose exec php php artisan migrate
- docker-compose exec php php artisan passport:install
- docker-compose exec php php artisan db:seed
- docker-compose ps