feat(dashboard): add sidebar, navbar, dynamic routes, summary & trend API, NIPH theme
This commit is contained in:
20
dashboard/app/Http/Controllers/DashboardController.php
Normal file
20
dashboard/app/Http/Controllers/DashboardController.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Surveillance;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function overview()
|
||||
{
|
||||
$programs = Surveillance::all();
|
||||
return view('dashboard.overview', compact('programs'));
|
||||
}
|
||||
|
||||
public function detail($code)
|
||||
{
|
||||
$selected = Surveillance::where('code', strtoupper($code))->firstOrFail();
|
||||
return view('dashboard.detail', compact('selected'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user