<?php

namespace Modules\Admin\Http\Livewire;

use Livewire\Component;


use Modules\User\Models\UserRole;
use Modules\User\Models\Role;

class AdminMenu extends Component
{
    public $userId;
    public function mount()
    {
        $this->userId = auth()->user()?->id;
    }
    public function render()
    {
        return view('admin::menu.index', [
            'userRoles' => UserRole::where('user_id', $this->userId)->pluck('role_id')->toArray(),
            'roles'     => Role::class
        ]);
    }
}