|
8 | 8 |
|
9 | 9 | Laravel Restful API is a Restful API project built on top of [Laravel](https://github.com/laravel/laravel) that is focused on REST API and Microservices.
|
10 | 10 |
|
| 11 | +## Prerequisites |
| 12 | +Before you begin, ensure you have met the following requirements: |
| 13 | +- You have installed the latest version of PHP and Composer. Here are the commands to install them: |
| 14 | + #### Install PHP |
| 15 | + ```bash |
| 16 | + sudo apt install php8.2 |
| 17 | + ``` |
| 18 | + #### Install Composer |
| 19 | + ```bash |
| 20 | + curl -sS https://getcomposer.org/installer | php |
| 21 | + sudo mv composer.phar /usr/local/bin/composer |
| 22 | + sudo chmod +x /usr/local/bin/composer |
| 23 | + ``` |
| 24 | +- You have installed the necessary PHP extensions for Laravel. Here are the commands to install them: |
| 25 | + - Mbstring PHP Extension: Laravel uses mbstring to handle strings in different character encodings, such as UTF-8. |
| 26 | + |
| 27 | + ```bash |
| 28 | + sudo apt install php8.2-mbstring |
| 29 | + ``` |
| 30 | + - XML PHP Extension: Laravel uses XML to parse and generate XML documents, such as configuration files and responses to API requests. |
| 31 | + ```bash |
| 32 | + sudo apt install php8.2-xml |
| 33 | + ``` |
| 34 | + - ZIP PHP Extension: Composer requires the ZIP extension to efficiently extract archived dependencies. |
| 35 | + ```bash |
| 36 | + sudo apt install php8.2-zip |
| 37 | + ``` |
| 38 | + - MySQL PHP Extension: This extension is used for connecting to the MySQL database. |
| 39 | + ```bash |
| 40 | + sudo apt install php8.2-mysql |
| 41 | + ``` |
| 42 | + - Redis PHP Extension: This extension provides APIs for connecting to a Redis server. |
| 43 | + ```bash |
| 44 | + sudo apt install php8.2-redis |
| 45 | + ``` |
| 46 | + - BCMath Extensions: These extensions are also required by Laravel. |
| 47 | + ```bash |
| 48 | + sudo apt install php8.2-bcmath |
| 49 | + ``` |
| 50 | +- You have a Windows/Mac/Linux machine. The above commands are for a Linux machine. If you’re using Windows or Mac, the installation commands might be different. |
| 51 | +- Docker installation is optional but recommended for development containerization. If you choose to use Docker, please ensure you have it installed on your machine. You can download it from the official Docker website. |
| 52 | + |
11 | 53 | ## How to Start
|
12 | 54 |
|
13 | 55 | ### The Native Way
|
|
0 commit comments