diff --git a/routes/api.php b/routes/api.php index da6453cb..b1da9e6d 100644 --- a/routes/api.php +++ b/routes/api.php @@ -2,6 +2,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; +use App\Http\Controllers\Api\V1; /* |-------------------------------------------------------------------------- @@ -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); + }); });