Inventory Items sent to dashboard

This commit is contained in:
BackwardsUser 2025-03-24 23:48:24 -04:00
parent bfaf20dd94
commit 8c68a5f598

View File

@ -2,12 +2,14 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Inventory;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use App\Models\Item; use App\Models\Item;
class DashboardController extends Controller class DashboardController extends Controller
{ {
public $TPL;
public function __construct() public function __construct()
{ {
$this->TPL = []; $this->TPL = [];
@ -21,6 +23,7 @@ class DashboardController extends Controller
$this->TPL["name"] = $user->name; $this->TPL["name"] = $user->name;
$this->TPL["failed"] = null; $this->TPL["failed"] = null;
$this->TPL["token"] = null; $this->TPL["token"] = null;
$this->TPL["items"] = Inventory::get();
return view("dashboard", $this->TPL); return view("dashboard", $this->TPL);
} }