<?php

namespace App\Http\Controllers\Superuser;

use App\Http\Controllers\Controller;
use App\Menus\Menu as MenusMenu;
use App\Models\Menu;
use App\Models\Permission;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
use Inertia\Inertia;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use SplFileInfo;
use Throwable;

class UserMenuController extends MenuController
{
    public function get()
    {
        return Menu::with(['childs', 'permissions'])
                    ->where('route_or_url','root')
                    ->orderBy('position')
                    ->get();
    }
}
