Basic Laravel CRUD API application included with Authentication Module & Product Module. It's included with JWT authentication and Swagger API format.
- PHP
- Laravel
- Interface-Repository Pattern
- Model Based Eloquent Query
- Swagger API Documentation - https://github.com/DarkaOnLine/L5-Swagger
- JWT Auth - https://github.com/tymondesigns/jwt-auth
- Register User API with Token
- Login API with Token
- Authenticated User Profile
- Refresh Data
- Logout
- Product List
- Product List [Public]
- Create Product
- Edit Product
- View Product
- Delete Product
- 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
. - Now migrate and seed database to complete whole project setup by running this-
php artisan migrate:refresh --seed
It will create 21
Users and 103
Dummy Products.
5. Run the server -
php artisan serve
- Open Browser - http://127.0.0.1:8000 & go to API Documentation - http://127.0.0.1:8000/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.
- Test with Postman - https://www.getpostman.com/collections/dbb31ed9c8dd676e0531 [Click to open with post man]
- Test with Swagger.
- Swagger Limitation: Image can not be uploaded throw Swagger, it can be uploaded throw Postman.