You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
monitor-doc/app/Http/Controllers/GeneralController.php

22 lines
634 B
PHTML

<?php
namespace App\Http\Controllers;
use App\Models\Document;
2 years ago
use App\Models\DocumentReminder;
use Illuminate\Http\Request;
class GeneralController extends Controller
{
2 years ago
public function index()
{
return inertia('Dashboard', [
'count_active' => Document::where('status', Document::ACTIVE)->count(),
'count_update' => Document::where('status', Document::UPDATE)->count(),
'count_expired' => Document::where('status', Document::EXPIRED)->count(),
2 years ago
'count_total' => Document::count(),
'events' => DocumentReminder::with('document')->get(),
]);
}
}