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

20 lines
534 B
PHTML

<?php
namespace App\Http\Controllers;
use App\Models\Document;
use Illuminate\Http\Request;
class GeneralController extends Controller
{
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(),
'count_total' => Document::count()
]);
}
}