Skip to content

Commit

Permalink
Update api.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias339 authored Nov 25, 2024
1 parent 926f79a commit 1b0983d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\V1;

/*
|--------------------------------------------------------------------------
Expand All @@ -19,9 +20,7 @@
});

Route::group(['middleware' => 'auth:sanctum'], function() {
// Task 12: Manage tasks with endpoint /api/v1/tasks/*****.
// Keep in mind that prefix should be /api/v1.
// Add ONE line to assign 5 resource routes to TaskController
Route::apiResource('/v1/tasks', App\Http\Controllers\TaskController::class);

Route::prefix('/v1')->group(function () {
Route::resource('tasks', V1\TaskController::class);
});
});

0 comments on commit 1b0983d

Please sign in to comment.