Laravel Restful API is a Restful API project built on top of Laravel that is focused on REST API and Microservices.
Before you begin, ensure you have met the following requirements:
sudo apt install php8.2
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
You have installed the necessary PHP extensions for Laravel. Here are the commands to install them:
Mbstring PHP Extension: Laravel uses mbstring to handle strings in different character encodings, such as UTF-8.
sudo apt install php8.2-mbstring
sudo apt install php8.2-xml
sudo apt install php8.2-zip
sudo apt install php8.2-mysql
sudo apt install php8.2-redis
sudo apt install php8.2-bcmath
Run the following commands
composer install
After execution you must check the .env
file and correct your appropriate database settings,
NOTE: Make sure the database you set deos exists in your local database system.
php artisan key:generate
php artisan migrate
php artisan db:seed
php artisan telescope:install
php artisan passport:install
php artisan passport:client --personal
Starting it, just run the command
php artisan serve
Before testing take note that we need to have a .env.testing
environment file first, we have an example and to apply it all you need todo is to copy the example file with the following command:
cp .env.testing.example .env.testing
Note that we're not on Docker so you should replace the DB_HOST
value in .env.testing
with localhost
in order for it to work.
To run the local unit test, use the command below
php artisan test
For Docker / Laravel Sail based setup, please refer to this documentation.
For Kubernetes / DevSpace setup, please refer to this documentation.
For extending real-time capabilities, we use websocket and pusher
For defining this project, we use this specification as a guide in the Development.
composer install
after laravel-restful-api
pod setup and running. (Kubernetes/DevSpace)Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, Laracasts can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
The Laravel framework is open-sourced software licensed under the MIT license.