The goal of this project is to develop an API for regional and national sales control, allowing salespeople to register their sales through mobile devices and managers and directors to monitor their teams' and units' performance via a web browser.
- Laravel 10: PHP framework for API development.
- MySQL: Database for information storage.
- XAMPP - This will install PHP and MySQL. It will also offer other options, but stick to these two.
- Add PHP to your PATH
- Composer
- Download this file
- Open your terminal where the file is located
- Run
php check.php
- This will show if you have the appropriate setup and will also display the location of your.ini
file. You might miss some extensions. See the next step. - Open the
.ini
file displayed with your editor of choice. You will remove the comment tag (; in the beginning of the line) from the following extensions:gd
zip
pdo_mysql
- Run
php check.php
again and all should be fine except for a Postgres warning. Ignore it.
- Clone the repository and enter the folder with your terminal
- Start MySQL's service (with XAMPP you can just click
start
in the GUI) - Download the .env file with the database configured for testing (If you already have a database setup you might need to adapt with your settings) and put it inside the project folder
- Run
composer install
to install all dependencies - Run
php artisan migrate
- Run
php artisan db:seed
- Start the serve with
php artisan serve
- You will need to have Postman installed in order to go through the next steps
- Download the collections and environments and import it to Postman. This will have the routes and documentation.
- Happy testing! :D
Software licensed under the MIT license.