This project is Backend API project for the Cookbook. Cookbook is a web application that allows users to share, browse, and shop for different recipes. Cookbook automatically totals ingredients from different recipes that have been added to the cart, resulting in a grocery list you can use to simplify your grocery shopping experience.
- PHP >= 7.4
- Laravel Framework >= 8.0
- Composer - Dependency Manager for PHP
- MySQL >= 5.6
- Navigate to the project directory
cd project-directory
- Install dependencies
composer install
- Create a copy of the .env.example file and rename it to .env
cp .env.example .env
- Generate an application key
php artisan key:generate
- Generate an JWT secret key
php artisan jwt:secret
- Configure the database in the .env file
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password
- Run migrations to create the required database tables
php artisan migrate
- (Optional) Seed the database with sample data
php artisan db:seed
To start the Laravel development server, run the following command:
php artisan serve
You should see a message indicating that the server is running locally on http://localhost:8000
.
Or
php artisan serve --host <my_ipaddress> --port <my_port>
Now you can login with one of following credientials.
[email protected] / admin
[email protected] / test1234
[email protected] / test1234
To run the tests for the project, use the following command:
php artisan test