<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;

class plantillaController extends Controller
{
    //

    public static function ObtenerMenusPermiso(){

        $rolId = auth()->user()->rol_id;        
        $menusRol = DB::table('permisos')->where('rol_id', $rolId)->get();
        return ($menusRol);

    }

    public static function ObtenerUnicoMenuById($Menu_id){

        $NombreFormulario = DB::table('menus')->where('menu_id', $Menu_id)->first();
        return ($NombreFormulario);

    }
}
