- Laravel = ^8.0
- JWT Auth = ^1.0
- PHP = ^7.4.*
- Clone the repo
git clone https://github.com/Diwas2055/RestAPi_JWT.git
- Open your terminal and move to the cloned project.
- Install composer dependencies
composer install
- Copy the .env.example file and rename it to .env
- In mysql create a new database and update the variable in .env file accordingly.
- Run the migrations
php artisan migrate
- Import Data into mysql
php artisan db:seed
- Run Project
php artisan serve
- To login in the app add /login to the APP_URL ( i.e :: http::localhost:8000/api/login)
- Check Using PostMan.
METHOD | URL | ACTION |
---|---|---|
GET / POST |
http://127.0.0.1:8000/api/tasks/{id} | FETCH ALL / SEARCH |
POST |
http://127.0.0.1:8000/api/tasks/ | STORE |
GET |
http://127.0.0.1:8000/api/tasks/{id} | SHOW |
POST |
http://127.0.0.1:8000/api/tasks/{id} | UPDATE |
DELETE |
http://127.0.0.1:8000/api/tasks/{id} | DELETE |
POST |
http://127.0.0.1:8000/api/tasks/deleteMultiple | DELETE SELECTED DATA |
File Name = Tasks_collection