This is a starter project built using Laravel v8.
The API authentication is done using Passport.
- PHP 7.3 or greater
- Composer
- MySQL
- Any email service credentials (use Mailtrap for testing purposes)
- Clone the repository to your machine
- Run
composer install
command to install all dependencies - Create 2 databases. One for the app and one for testing purposes.
- Copy
.example.env
file and rename it to .env - Make sure the database credentials are updated in .env file (Both databases must have same username & password)
- Update email service credentials in .env file
- Run
php artisan key:generate
to generate app key - Run
php artisan config:cache
- Run
composer update
to update all dependencies to latest (OPTIONAL) - Run
php artisan config:clear
- Update the variable
DB_DATABASE
to your testing database name in .env file before running tests - Run
php artisan test
to perform all the tests - Update the variable
DB_DATABASE
to your actual database name in .env file before proceeding to next step - Run
php artisan optimize
to optimize the whole app - Run
php artisan migrate --seed
App is Ready!
Run php artisan serve
to start the app.
Note: MySQL server must be up before running this command
Access the app using the below credentials
- email: [email protected]
- password: password
The API documentation can be found here.