This project is built using Laravel version 11 and focuses on REST API design. It implements best practices and emphasizes separating requests and responses while adhering to various design principles such as DRY (Don't Repeat Yourself), SOLID, and Separation of Concerns.
- Two complete CRUD operations for models:
Role
andIpList
- Usage of:
- Traits
- Services
- Enums
- Custom Middleware
- JWT Token Authentication
- Object-Oriented Programming (OOP) principles
- DRY (Don't Repeat Yourself) approach
- Request handling
- Resource management
-
Clone the Repository:
- Open your terminal or command prompt.
- Navigate to the directory where you want to clone the project.
- Run the following command:
git clone https://github.com/sMmominur/restapi-laravel.git
-
Install Dependencies:
- Navigate into the cloned project directory:
cd project-name
- Install Composer dependencies:
composer install
- Navigate into the cloned project directory:
-
Create Environment File:
- Make a copy of the
.env.example
file and rename it to.env
:cp .env.example .env
- Generate an application key:
php artisan key:generate
- Make a copy of the
-
Database Configuration:
- Open the
.env
file and configure your database connection settings. - Set the database name, username, password, and other relevant settings.
- Open the
-
Run Migrations and Seeders:
- Run database migrations to create tables:
php artisan migrate
- Run the seeders to populate the database with sample data:
php artisan db:seed
- Run database migrations to create tables:
-
Serve the Application:
- Start the Laravel development server:
php artisan serve
- Start the Laravel development server:
-
Access the Application:
- Open your web browser and go to
http://localhost:8000
or the URL provided by thephp artisan serve
command.
- Open your web browser and go to
-
Test APIs:
- Utilize the provided CRUD operations for testing the REST APIs as per the project's documentation or instructions.
-
Explore Additional Features:
- Explore and test additional features such as Traits, Services, Enums, Custom Middleware, JWT Token Authentication, Object-Oriented Programming (OOP) principles, DRY approach, Request handling, and Resource management as provided in the project.
-
Start Developing:
- With the project set up, you can now start developing your application or explore further customization as per your requirements.
Details of requests and responses are provided in the following Postman documentation. Please follow the document for comprehensive API usage and understanding.
Make sure to consult the provided documentation for information on how to interact with the APIs, including request formats, available endpoints, authentication mechanisms (if any), and sample responses.
This documentation serves as a guide for developers to effectively utilize and integrate the API endpoints into their applications.