meobda-website/app/View/Components/Layout/Admin.php

42 lines
875 B
PHP

<?php
namespace App\View\Components\Layout;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Admin extends Component
{
public array $menuItems = [];
/**
* Create a new component instance.
*/
public function __construct()
{
$this->menuItems = [
[
'name' => 'Site Home',
'link' => route('welcome'),
],
[
'name' => 'Dashboard',
'link' => route('admin.dashboard'),
],
[
'name' => 'Users',
'link' => route('admin.users.index'),
]
];
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.layout.admin');
}
}