add duration

This commit is contained in:
Romulus21
2024-02-17 00:02:39 +01:00
parent 335fc8b12b
commit f27ffc1ce8
19 changed files with 248 additions and 48 deletions

View File

@@ -12,9 +12,15 @@ class TimeTrackerController extends Controller
/**
* Display a listing of the resource.
*/
public function index()
public function index(Request $request)
{
//
$timeTrackers = $request->user()
->timeTrackers()
->with('toDo')
->orderBy('start_at', 'desc')
->paginate();
return response()->json(TimeTrackerResource::collection($timeTrackers));
}
/**