|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route; |
|
|
|
use App\Http\Controllers\usuariosController; |
|
|
|
use App\Http\Controllers\HomeController; |
|
|
|
|
|
|
|
/* |
|
|
|
|-------------------------------------------------------------------------- |
|
|
@ -15,15 +16,15 @@ use App\Http\Controllers\usuariosController; |
|
|
|
*/ |
|
|
|
|
|
|
|
Route::get('/', function () { |
|
|
|
return view('welcome'); |
|
|
|
return redirect()->route('login'); |
|
|
|
}); |
|
|
|
|
|
|
|
Auth::routes(['register'=>false,'reset'=>false]); |
|
|
|
|
|
|
|
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); |
|
|
|
|
|
|
|
Route::get('/usuarios', [usuariosController::class,'index'])->name('usuarios'); |
|
|
|
|
|
|
|
Route::get('/usuarios/nuevo', [usuariosController::class,'create'])->name('usuarios.create'); |
|
|
|
|
|
|
|
Route::post('/usuarios/store', [usuariosController::class,'store'])->name('usuarios.store'); |
|
|
|
// Rutas protegidas que requieren autenticación |
|
|
|
Route::middleware(['auth'])->group(function () { |
|
|
|
Route::get('/dashboard', [HomeController::class, 'index'])->name('dashboard'); |
|
|
|
Route::get('/usuarios', [usuariosController::class,'index'])->name('usuarios'); |
|
|
|
Route::get('/usuarios/nuevo', [usuariosController::class,'create'])->name('usuarios.create'); |
|
|
|
Route::post('/usuarios/store', [usuariosController::class,'store'])->name('usuarios.store'); |
|
|
|
}); |
|
|
|