31 lines
596 B
PHP
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);
|
|
}
|
|
}
|