To avoid API resource routes and not create all of them, use in routes: Route::apiResource('/tasks', TaskController::class)->only('index', 'show');