id_test_sessions)->first(); if($data_sessions != null) { if($request->token_session == $data_sessions->token_session) { // simpan data tobii ke db return response()->json(['message' => 'Data tobii berhasil disimpan.'], 200); } else { return response()->json(['message' => 'Token sesi tidak valid.'], 401); } } else { return response()->json(['message' => 'Data sesi tes tidak ditemukan.'], 404); } } /** * Display the specified resource. */ public function show(string $id) { // } /** * Show the form for editing the specified resource. */ public function edit(string $id) { // } /** * Update the specified resource in storage. */ public function update(Request $request, string $id) { // } /** * Remove the specified resource from storage. */ public function destroy(string $id) { // } }