Update source into github
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use App\Repositories\Menu\MenuRepositoryInterface;
|
||||
use App\Traits\GetConfig;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class SiderbarUser extends Component
|
||||
{
|
||||
use GetConfig;
|
||||
|
||||
public $menu;
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
protected MenuRepositoryInterface $menuRepositoryInterface;
|
||||
|
||||
public function __construct(MenuRepositoryInterface $menuRepositoryInterface)
|
||||
{
|
||||
$this->menuRepositoryInterface = $menuRepositoryInterface;
|
||||
$this->menu = $this->menuRepositoryInterface->getTree();
|
||||
}
|
||||
|
||||
// public function routeName($routeName, $param)
|
||||
// {
|
||||
// return $routeName ? route($routeName, $param) : '#';
|
||||
// }
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
return view('components.siderbar-user');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user