The goal of this project create an optimized Laravel API .
- In the case of not having git in your local follow these steps https://www.atlassian.com/git/tutorials/install-git
git clone https://github.com/mariodiasbatista/laravel-api.git-
Copy the
.env.exampleto.envand edit accordingly -
Pull composer packages
-
on the case of not having composer follow these steps https://www.hostinger.com/tutorials/how-to-install-composer
./etc/bin/php composer installor
composer install- Note in case of Ubunto :
-
Go an issue with ext-dg depedency
- sudo apt-get update
- php -v (check version to choose the correct php package version in my case 8.3)
- sudo apt-get install php8.3-gd
-
Go an issue with ext-zip
- sudo apt-get install php8.3-zip
-
And again
-
./etc/bin/php composer installor
composer installsudo APP_PORT={the port you want the site to run}
./vendor/bin/sail up- Run the migrations
./vendor/bin/sail artisan migrate- Spin up the application
./vendor/bin/sail up- if any issues on website local server plse check the local server port and also add to your env
APP_PORT=89
-
Go to webbrowser and in http:1270.0.1:89 (example) create the public key
-
If MySql is returning network issue doe same port being used please do :
docker-compose down --volumes
sail up --build- And again
./vendor/bin/sail artisan migrate-
Should be Up and running
-
to exit Sail just ctrl+c or
./vendor/bin/sail down