fix(controller): resolve F-01 — create missing HomeController with correct column names (lat/lng)
This commit is contained in:
18
src/app/Http/Controllers/HomeController.php
Normal file
18
src/app/Http/Controllers/HomeController.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$stations = DB::table('station')
|
||||||
|
->select('stationid', 'name', 'district', 'lat', 'lng', 'rainfall', 'waterlevel', 'siren')
|
||||||
|
->orderBy('stationid')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
return view('layout.dashboard', compact('stations'));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user