Giter Club home page Giter Club logo

smmominur / restapi-laravel Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 438 KB

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.

PHP 76.54% JavaScript 0.19% Blade 23.27%
design-patterns dry laravel laravel-11 mysql oop php rest-api

restapi-laravel's Introduction

Project Details

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.

Features Implemented

  • Two complete CRUD operations for models: Role and IpList
  • 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

Setting Up The Project

  1. 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
  2. Install Dependencies:

    • Navigate into the cloned project directory:
      cd project-name
    • Install Composer dependencies:
      composer install
  3. 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
  4. Database Configuration:

    • Open the .env file and configure your database connection settings.
    • Set the database name, username, password, and other relevant settings.
  5. 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
  6. Serve the Application:

    • Start the Laravel development server:
      php artisan serve
  7. Access the Application:

    • Open your web browser and go to http://localhost:8000 or the URL provided by the php artisan serve command.
  8. Test APIs:

    • Utilize the provided CRUD operations for testing the REST APIs as per the project's documentation or instructions.
  9. 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.
  10. Start Developing:

    • With the project set up, you can now start developing your application or explore further customization as per your requirements.

API Sample and Documentation

Details of requests and responses are provided in the following Postman documentation. Please follow the document for comprehensive API usage and understanding.

Postman Documentation

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.

restapi-laravel's People

Contributors

mominurgt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.