Skip to main content

Overview

Dashboard Laravel defines all application routes in routes/web.php. The application includes authentication routes, dashboard pages, and various administrative sections.

Route List

MethodPathRoute NameController/ActionPurpose
GET/homeAuthController@showLoginLogin page
POST/loginloginAuthController@loginProcess login
POST/logoutlogoutAuthController@logoutProcess logout
GET/signupsignupAuthController@showRegisterRegistration page
POST/signupregisterAuthController@registerProcess registration
GET/dashboarddashboardClosureDashboard home
GET/estadisticasestadisticasClosureStatistics page
GET/analisisanalisisClosureAnalysis page
GET/ventasventasClosureSales page
GET/clientesclientesClosureCustomers page
GET/facturasfacturasClosureInvoices page
GET/mensajesmensajesClosureMessages page
GET/configuracionconfiguracionClosureSettings page
GET/nosotrosnosotrosClosureAbout page

Route Definitions

Authentication Routes

Route::get('/', [AuthController::class, 'showLogin'])->name('home');
Route::post('/login', [AuthController::class, 'login'])->name('login');
/
GET
Displays the login form. Named route: home
/login
POST
Processes user authentication. Named route: login

Dashboard Routes

All dashboard routes use closures to return views directly:
Route::get('/dashboard', fn() => view('welcome'))->name('dashboard');
Route::get('/estadisticas', fn() => view('estadisticas'))->name('estadisticas');
Route::get('/analisis', fn() => view('analisis'))->name('analisis');
Route::get('/ventas', fn() => view('ventas'))->name('ventas');
Route::get('/clientes', fn() => view('clientes'))->name('clientes');
Route::get('/facturas', fn() => view('facturas'))->name('facturas');
Route::get('/mensajes', fn() => view('mensajes'))->name('mensajes');
Route::get('/configuracion', fn() => view('configuracion'))->name('configuracion');
Route::get('/nosotros', fn() => view('nosotros'))->name('nosotros');
All dashboard routes use simple closures that return Blade views. This is efficient for pages that don’t require complex logic or data processing.

Dashboard Pages

/dashboard
GET
Main dashboard page displaying the welcome view
/estadisticas
GET
Statistics and metrics page
/analisis
GET
Data analysis and reporting page
/ventas
GET
Sales management page
/clientes
GET
Customer management page
/facturas
GET
Invoice management page
/mensajes
GET
Messaging and communications page
/configuracion
GET
Application settings and configuration page
/nosotros
GET
About page with company information

Using Named Routes

All routes are named, allowing you to reference them in your Blade templates and controllers:
// In Blade templates
<a href="{{ route('dashboard') }}">Dashboard</a>
<a href="{{ route('clientes') }}">Clientes</a>

// In controllers
return redirect()->route('login');
return redirect()->route('dashboard');
Named routes provide flexibility - you can change the URL without updating references throughout your application.

Route Organization

The routes are organized into two main groups:
  1. Authentication Routes - Handle user login, registration, and logout
  2. Dashboard Routes - Application pages accessible after authentication
Currently, the route file doesn’t show explicit middleware groups. Consider adding authentication middleware to protect dashboard routes.

Build docs developers (and LLMs) love