|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2022-10-21 (3 months ago) ||Not yet rated by the users||Total: 31 ||All time: 10,680 This week: 3|
This package allows to implementation of API that provides CRUD operations.
It provides a Laravel-based application that implements several modules there perform operations to create, read, update and delete records of model objects.
Currently, it provides modules that perform CRUD operations on:
- Registered users
- Available products
- User welcome
Laravel CRUD API with Auth
Basic Laravel CRUD API application included with Authentication Module & Product Module. It's included with JWT authentication and Swagger API format.
Language & Framework Used:
Older Versions (if Needed):
Laravel 8.x - https://github.com/ManiruzzamanAkash/Laravel-Advanced-CRUD-API/releases/tag/vLaravel8.x
Model Based Eloquent Query
Swagger API Documentation - https://github.com/DarkaOnLine/L5-Swagger
JWT Auth - https://github.com/tymondesigns/jwt-auth
PHP Unit Testing - Some basic unit testing added.
[x] Register User API with Token
[x] Login API with Token
[x] Authenticated User Profile
[x] Refresh Data
[x] Product List
[x] Product List [Public]
[x] Create Product
[x] Edit Product
[x] View Product
[x] Delete Product
How to Run:
Clone Project -
git clone https://github.com/ManiruzzamanAkash/Laravel-Basic-CRUD-API.git
Go to the project drectory by `cd Laravel-Basic-CRUD-API` & Run the
Create `.env` file & Copy `.env.example` file to `.env` file
Create a database called - `laravel_basic_crud`.
Install composer packages - `composer install`.
It will create `21` Users and `103` Dummy Products.
Now migrate and seed database to complete whole project setup by running this-
php artisan migrate:refresh --seed
Generate Swagger API
php artisan l5-swagger:generate
Run the server -
php artisan serve
Open Browser -
http://127.0.0.1:8000 & go to API Documentation -
You'll see a Swagger Panel.
First Login with the given credential or any other user credential
Set bearer token to Swagger Header or Post Header as Authentication
Hit Any API, You can also hit any API, before authorization header data set to see the effects.
API List Views:
<img src="https://i.ibb.co/gV1Yn9Z/1-Swagger-API-Demo.png" alt="1-Swagger-API-Demo" border="0">
Login in Swagger with Given Data:
<img src="https://i.ibb.co/5vrXkgN/2-API-Login1.png" alt="2-API-Login1" border="0">
Get token After Successful Login:
<img src="https://i.ibb.co/cQ37n9t/3-API-Login2-Response.png" alt="3-API-Login2-Response" border="0">
Set token in Swagger Header:
<img src="https://i.ibb.co/m8xQZ4T/Screenshot-2022-07-12-at-8-37-47-AM.png" alt="4-API-Swagger-Set-Bearer-Token" border="0">
Or, Set token in Postman Header as Authorization:
<img src="https://i.ibb.co/7p8Y3Yz/Postman-Product-List-API-with-Authenticated-Token.png" alt="Postman-Product-List-API-with-Authenticated-Token" border="0">
Hit Any API Route in Swagger:
<img src="https://i.ibb.co/VSWbXq9/5-API-Swaagger-Public-Product-List-View.png" alt="5-API-Swaagger-Public-Product-List-View" border="0">
Image Upload throw Postman:
<img src="https://i.ibb.co/VBkMBBp/Postman-Store-Product-with-File-Upload.png" alt="Postman-Store-Product-with-File-Upload" border="0">
Test with Postman - https://www.getpostman.com/collections/5642915d135f376b84af [Click to open with post man]
Test with Swagger.
Swagger Limitation: Image can not be uploaded throw Swagger, it can be uploaded throw Postman.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.