murdercode/yaTTA

View on GitHub
app/Http/Controllers/ChatController.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace App\Http\Controllers;

use App\Models\Chat;

class ChatController extends Controller
{
    public function show($id)
    {
        $chat = Chat::findOrFail($id);

        // Update last access time
        $chat->updated_at = now();
        $chat->save();

        return view('chat.show', compact('chat'));
    }
}