Updated Dashboard
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Manufacturer;
|
||||
use App\Models\Filament;
|
||||
|
||||
class ManufacturerController extends Controller
|
||||
{
|
||||
@@ -13,8 +14,9 @@ class ManufacturerController extends Controller
|
||||
public function index()
|
||||
{
|
||||
// show all manufacturers
|
||||
$manufacturers = Manufacturer::all();
|
||||
return view('manufacturers.index', compact('manufacturers'));
|
||||
$manufacturers = Manufacturer::all()->sortBy('name');
|
||||
$filamentcount = Filament::all()->count();
|
||||
return view('manufacturers.index', compact('manufacturers', 'filamentcount'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Dashboard extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.dashboard');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user