Coder Social home page Coder Social logo

easy-api's Introduction

Easy Api

Easy Way to integrate API in you laravel application.

Installation Guide


Install Package using Composer.

composer require flutterbuddy1/easy-api

Paste the code below given.

Use this to your route/api.php

use Flutterbuddy1\EasyApi\EasyApi;

And add this inside you api middleware in route/api.php

EasyApi::api();

That's It your API's is ready to go ๐Ÿš€


API's Docs


Get Data API

Send GET Request in this api.

http://YOUR_APPLICATION_URL/api/{TABLE_NAME}

Example:

http://localhost:8000/api/posts
  • Include Table
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}?include={OTHER_TABLE_NAME}

Example:

http://localhost:8000/api/posts?include=categories,users

Get Data By Id API

Send GET Request in this api.

http://YOUR_APPLICATION_URL/api/{TABLE_NAME}/{ID}

Example:

http://localhost:8000/api/posts/3
  • Include Table
http://YOUR_APPLICATION_URL/api/{TABLE_NAME}/{ID}?include={OTHER_TABLE_NAME}

Example:

http://localhost:8000/api/posts/3?include=categories,users

Post Data API

Send POST Request in this api.

http://YOUR_APPLICATION_URL/api/{TABLE_NAME}

Example:

http://localhost:8000/api/posts

Post Data in JSON :

{
    "title:"Some Title",
    "content":"Some Content",
    "category":"YOUR CATEGORY ID",
    "user":"YOUR USER ID",
}

Update Data API

Send PUT Request in this api.

http://YOUR_APPLICATION_URL/api/update/{TABLE_NAME}

Example:

http://localhost:8000/api/update/posts

Post Data in JSON :

{
    "title:"UPDATED TITLE",
    "content":"UPDATED CONTENT",
}

Delete Data API

Send DELETE Request in this api.

http://YOUR_APPLICATION_URL/api/delete/{TABLE_NAME}/{ID}

Example: :
http://localhost:8000/api/delete/posts/3

Contribute for Adding New Features

Created With โ™ฅ By FlutterBuddy

easy-api's People

Contributors

flutterbuddy1 avatar

Stargazers

 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.