Build the backend of an api to manage users and appointments.
During covid, my dentist office specifically kept calling me to change appointments- It made me wonder how things are done from their end and how to possibly make the experience better overall.
This api is specifically for a dentist’s office to help manage their database.
If you would like to follow along in the series - The playlist link for this video can be found here
- Laravel/PHP
- SQL
-
Laravel valet
- If you do not have Laravel Valet installed, follow the instructions here
brew update
brew install php
- Install composer here
composer global require laravel/valet
. Be sure the ~/.composer/vendor/bin directory is in your system's "PATH".valet install
- Directions to serve the site (https://laravel.com/docs/6.x/valet#serving-sites):
- In your terminal, make a new directory for the project:
mkdir ~/Code
cd ~/Code
- run
valet park
- In your terminal, make a new directory for the project:
- Fork or clone project here into
~/Code
directory: appointment api - Once project is cloned, spin up the website at appointment.test/api
- If you do not have Laravel Valet installed, follow the instructions here
-
MySQL
-
brew install mysql@5.7
-
brew services start mysql@5.7
-
Once valet and project has been cloned locally, run
composer install
-
Use Postman install here or browser to visit api route - Example route to visit Get all users
- Initialise the database seeder by running the command:
php artisan db:seed
- Remove all tables and add new data:
php artisan migrate:fresh --seed
If you need to make changes to the database:
- Run the command:
php artisan migrate:fresh --seed
- Make your changes
- Then run the command
php artisan db:seed
and confirm your changes in the database.