nhrrob / laravel-8-api-crud

A Laravel 8 RESTful API Crud with Passport

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub issues GitHub forks GitHub stars GitHub license

Laravel 8 API Crud (Passport)

Laravel 8 API Crud is a basic RESTful API crud app built with Laravel 8 and Passport. In this project a rest api created for managing product crud operations.

Features (API) include:

  • Laravel passport package
  • Authentication using passport
  • Logout to remove old tokens
  • Create product.
  • List products.
  • Update product.
  • Delete product
  • Search By Title
  • Pagination link with json data

This app created to help developers to get started with their api crud based apps.

Install

Install commands:

- git clone https://github.com/nhrrob/laravel-8-api-crud.git 
- composer update
- add .env and update database settings
- php artisan migrate:fresh --seed
- php artisan serve

Use Postman to test the API.

Note

  • Login:

    • URL: http://laravel-8-api-crud.rob/api/login
    • Method: POST
    • Insert email and password: Body tab => x-www-form-urlencode
    • Press Enter to get Bearer token;
    • For future request add this token:
      Authorization tab: Type => Bearer Token; Insert token.
  • Insert/Update:

    • Use Body tab => x-www-form-urlencode : Add title key and its value
    • Another way: Body tab => raw : select json type
  • Demo User (database/seeders/DatabaseSeeder.php):
    admin@admin.com/password

License

The Laravel 8 Crud is open-sourced software licensed under the MIT license.

Contact

Feel free to contact:
nazmulrobin.com | Twitter | Linkedin | Email

About

A Laravel 8 RESTful API Crud with Passport

License:MIT License


Languages

Language:PHP 82.2%Language:Blade 17.1%Language:Shell 0.8%