From 1b0983db8547c018a96e5321edf31978c809b284 Mon Sep 17 00:00:00 2001 From: "Md. Elias Shikdar" <82110741+Elias339@users.noreply.github.com> Date: Mon, 25 Nov 2024 23:41:57 +0600 Subject: [PATCH] Update api.php --- routes/api.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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); + }); });