A5.php/app/Http/Controllers/DashboardController.php
2025-03-24 23:48:24 -04:00

31 lines
596 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Inventory;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Models\Item;
class DashboardController extends Controller
{
public $TPL;
public function __construct()
{
$this->TPL = [];
}
public function displayPage(Request $request)
{
$user = Auth::user();
$this->TPL["name"] = $user->name;
$this->TPL["failed"] = null;
$this->TPL["token"] = null;
$this->TPL["items"] = Inventory::get();
return view("dashboard", $this->TPL);
}
}