An open API service indexing awesome lists of open source software.

https://github.com/dilan032/product-inventory-api

A lightweight RESTful API for inventory management using Laravel 12 with Sanctum authentication.
https://github.com/dilan032/product-inventory-api

eloquent-orm laravel-sanctum-api-auth-with-token laravel12x restful-api

Last synced: 5 months ago
JSON representation

A lightweight RESTful API for inventory management using Laravel 12 with Sanctum authentication.

Awesome Lists containing this project

README

          

Laravel Logo


└── routes
├── api.php
├── console.php
└── web.php

/routes/api.php:
--------------------------------------------------------------------------------
1 | name('register');
12 |
13 | Route::post('/login',
14 | [AuthenticationController::class, 'login'])->name('login');
15 |
16 | // Product routes
17 | Route::middleware('auth:sanctum')->group(function () {
18 | Route::resource('products', ProductController::class)
19 | ->only(['index', 'store', 'show', 'update', 'destroy'])
20 | ->names([
21 | 'index' => 'products.index',
22 | 'store' => 'products.store',
23 | 'show' => 'products.show',
24 | 'update' => 'products.update',
25 | 'destroy' => 'products.destroy'
26 | ]);
27 | });
28 |
29 |
30 |
31 |