feat: implement basic API
with authorization and validation
This commit is contained in:
parent
b033262bd7
commit
6fbeedd50c
21 changed files with 599 additions and 10 deletions
13
routes/api.php
Normal file
13
routes/api.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\EntryController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::middleware('auth:sanctum')->group(function () {
|
||||
Route::get('/entries', [EntryController::class, 'index']);
|
||||
Route::post('/entries', [EntryController::class, 'store']);
|
||||
Route::get('/entries/{entry}', [EntryController::class, 'show']);
|
||||
Route::put('/entries/{entry}', [EntryController::class, 'update']);
|
||||
Route::delete('/entries/{entry}', [EntryController::class, 'destroy']);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue