Coder Social home page Coder Social logo

crud-api's Introduction

CRUD API using Laravel

This repository provides a simple CRUD (Create, Read, Update, Delete) API built using the Laravel framework. The API allows you to manage resources through basic HTTP operations. This README.md file serves as a guide to help you understand the project structure, set up the environment, and start using the API.

Prerequisites

Before getting started, ensure that you have the following prerequisites installed on your system:

  • PHP (>= 7.4)
  • Composer
  • Laravel (>= 8.0)
  • MySQL (or any other supported database)

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/your-username/crud-api-laravel.git
  1. Navigate to the project directory:
cd crud-api-laravel
  1. Install the dependencies using Composer:
composer install
  1. Create a copy of the .env.example file and rename it to .env. Update the database connection details within this file according to your environment setup.

  2. Run the database migrations to create the required tables:

php artisan migrate
  1. seed the database with sample data, run the following command:
php artisan db:seed
  1. Start the development server:
php artisan serve

API Endpoints

The following endpoints are available:

  • GET /api/v1/product - Get all product
  • GET /api/v1/product/{id} - Get a specific product by ID
  • POST /api/v1/product - Create a new product
  • PUT /api/v1/product/{id} - Update a product by ID
  • DELETE /api/v1/product/{id} - Delete a product by ID

crud-api's People

Contributors

muntaswir72562 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.