refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
28
app/Http/Controllers/Settings/AuditLogController.php
Normal file
28
app/Http/Controllers/Settings/AuditLogController.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Helpers\AccountHelper;
|
||||
use App\Helpers\AuditLogHelper;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class AuditLogController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display the page listing all the audit logs.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$logs = auth()->user()->account->auditLogs()
|
||||
->with('author')
|
||||
->orderBy('created_at', 'desc')
|
||||
->paginate(15);
|
||||
|
||||
$accountHasLimitations = AccountHelper::hasLimitations(auth()->user()->account);
|
||||
|
||||
return view('settings.auditlog.index')
|
||||
->withLogsCollection(AuditLogHelper::getCollectionOfAudits($logs))
|
||||
->withAccountHasLimitations($accountHasLimitations)
|
||||
->withLogsPagination($logs);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user