Browse Source

cambio en el web

cambio al login original
main
sergiomarquez778 1 month ago
parent
commit
237fbcc5f9
  1. 2
      app/Providers/RouteServiceProvider.php
  2. 17
      routes/web.php

2
app/Providers/RouteServiceProvider.php

@ -17,7 +17,7 @@ class RouteServiceProvider extends ServiceProvider
*
* @var string
*/
public const HOME = '/home';
public const HOME = '/dashboard';
/**
* Define your route model bindings, pattern filters, and other route configuration.

17
routes/web.php

@ -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');
});

Loading…
Cancel
Save