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.
		
		
		
		
			
				
					24 lines
				
				533 B
			
		
		
			
		
	
	
					24 lines
				
				533 B
			| 
								 
											6 months ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace App\Http\Controllers;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								use Illuminate\Http\Request;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class UserDashboardController extends Controller
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    public function __construct()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        $this->middleware('auth');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public function index()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        // Verificar si el usuario tiene el correo específico
							 | 
						||
| 
								 | 
							
								        if (auth()->user()->email !== 'usuarios@usuariosgmail.com') {
							 | 
						||
| 
								 | 
							
								            return redirect('/')->with('error', 'No tienes permiso para acceder a esta sección');
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        return view('user-dashboard.index');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |