<?php

namespace App\Livewire;

use Livewire\Component;

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


class MainMenu extends Component
{

    public $userId;

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