You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
528 B
23 lines
528 B
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
class UserDashboardController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
// Permitir acceso solo a usuarios con tipos_id == 2 (Servicios Generales)
|
|
if (auth()->user()->tipos_id != 2) {
|
|
return redirect('/')->with('error', 'No tienes permiso para acceder a esta sección');
|
|
}
|
|
|
|
return view('user-dashboard.index');
|
|
}
|
|
}
|
|
|