<?php
namespace App\Http\Controllers;
use App\Models\AuditLog;
use App\Services\OrganizationAccess;
use Illuminate\Http\Request;
class AuditLogController extends Controller {
    public function index(Request $request){
        $logs=OrganizationAccess::apply(AuditLog::with(['organization','user'])->latest('created_at'),$request->user())->paginate(50);
        return view('admin.audit.index',compact('logs'));
    }
}
