46 lines
1002 B
PHP
46 lines
1002 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'),
|
|
],
|
|
[
|
|
'name' => 'Site Data',
|
|
'link' => route('admin.site-data.index'),
|
|
],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get the view / contents that represent the component.
|
|
*/
|
|
public function render(): View|Closure|string
|
|
{
|
|
return view('components.layout.admin');
|
|
}
|
|
}
|