Route Overview
All routes are defined inroutes/web.php and protected by the verified middleware, requiring authenticated and email-verified users.
Authentication Routes
Laravel UI provides these authentication routes:routes/web.php:34
| Method | URI | Description |
|---|---|---|
| GET | /login | Show login form |
| POST | /login | Process login |
| POST | /logout | Log out user |
| GET | /register | Show registration form |
| POST | /register | Process registration |
| GET | /password/reset | Show password reset form |
| POST | /password/email | Send password reset email |
| GET | /password/reset/{token} | Show reset password form |
| POST | /password/reset | Reset password |
| GET | /email/verify | Email verification notice |
| GET | /email/verify/{id}/{hash} | Verify email |
| POST | /email/resend | Resend verification email |
Home Route
routes/web.php:29-36
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | / | - | - | Redirects to /home |
| GET | /home | HomeController | index | Dashboard/home page |
Profile Routes
Manage user profiles with photos and personal information:routes/web.php:41-44
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /mi-perfil | PerfilController | index | View user profile |
| POST | /actualizar-foto-perfil | PerfilController | actualizarIMG | Upload profile photo |
| GET | /eliminar-foto-perfil | PerfilController | eliminarFotoPerfil | Delete profile photo |
| PUT | /actualizar-datos-perfil | PerfilController | actualizarDatos | Update profile data |
Password Change Routes
routes/web.php:62-63
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /cambiar-clave | PerfilController | cambiarClave | Show password change form |
| POST | /cambiar-clave | PerfilController | actualizarClave | Process password change |
Company Routes
Manage company information and branding:routes/web.php:48-51
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /empresa-index | EmpresaController | index | View company information |
| POST | /empresa-update-{id} | EmpresaController | update | Update company info |
| POST | /actualizar-logo | EmpresaController | actualizarLogo | Upload company logo |
| DELETE | /eliminar-logo | EmpresaController | eliminarLogo | Delete company logo |
Product Routes
Resource Routes
routes/web.php:55
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /productos | ProductoController | index | List all products |
| GET | /productos/create | ProductoController | create | Show product creation form |
| POST | /productos | ProductoController | store | Create new product |
| GET | /productos/{id} | ProductoController | show | View product details |
| GET | /productos/{id}/edit | ProductoController | edit | Show product edit form |
| PUT/PATCH | /productos/{id} | ProductoController | update | Update product |
| DELETE | /productos/{id} | ProductoController | destroy | Delete product |
Custom Product Routes
routes/web.php:56-58
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| POST | /buscar-producto | ProductoController | buscarProducto | Search products (AJAX) |
| POST | /registrar-foto-producto | ProductoController | registrarFotoProducto | Upload product image |
| DELETE | /eliminar-productos | ProductoController | eliminarProducto | Delete product photo |
Category Routes
routes/web.php:67
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /categoria | CategoriaController | index | List all categories |
| GET | /categoria/create | CategoriaController | create | Show category creation form |
| POST | /categoria | CategoriaController | store | Create new category |
| GET | /categoria/{id} | CategoriaController | show | View category details |
| GET | /categoria/{id}/edit | CategoriaController | edit | Show category edit form |
| PUT/PATCH | /categoria/{id} | CategoriaController | update | Update category |
| DELETE | /categoria/{id} | CategoriaController | destroy | Delete category |
User Management Routes
Resource Routes
routes/web.php:70
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /usuario | UsuarioController | index | List all users |
| GET | /usuario/create | UsuarioController | create | Show user creation form |
| POST | /usuario | UsuarioController | store | Create new user |
| GET | /usuario/{id} | UsuarioController | show | View user details |
| GET | /usuario/{id}/edit | UsuarioController | edit | Show user edit form |
| PUT/PATCH | /usuario/{id} | UsuarioController | update | Update user |
| DELETE | /usuario/{id} | UsuarioController | destroy | Delete user |
Custom User Routes
routes/web.php:71-72
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| POST | /registrar-foto-usuario | UsuarioController | registrarFotoUsuario | Upload user photo |
| DELETE | /eliminar-usuarios | UsuarioController | eliminarUsuario | Delete user photo |
Inventory Entry Routes
routes/web.php:76
| Method | URI | Controller | Action | Description |
|---|---|---|---|---|
| GET | /entradas | EntradaController | index | List all inventory entries |
| GET | /entradas/create | EntradaController | create | Show entry creation form |
| POST | /entradas | EntradaController | store | Create new entry |
| GET | /entradas/{id} | EntradaController | show | View entry details |
| GET | /entradas/{id}/edit | EntradaController | edit | Show entry edit form |
| PUT/PATCH | /entradas/{id} | EntradaController | update | Update entry |
| DELETE | /entradas/{id} | EntradaController | destroy | Delete entry |
Route Naming Conventions
Sistema de Ventas uses consistent naming patterns:Resource Routes
- Index:
{resource}.index(e.g.,productos.index) - Create:
{resource}.create(e.g.,productos.create) - Store:
{resource}.store(e.g.,productos.store) - Show:
{resource}.show(e.g.,productos.show) - Edit:
{resource}.edit(e.g.,productos.edit) - Update:
{resource}.update(e.g.,productos.update) - Destroy:
{resource}.destroy(e.g.,productos.destroy)
Custom Routes
- Operation-based:
{resource}.{action}(e.g.,producto.buscar) - Profile:
usuario.{action}orperfil.{action} - Company:
empresa.{action}
Middleware Usage
All application routes use theverified middleware:
- User is authenticated (logged in)
- User’s email address is verified
- Automatic redirect to verification page if not verified
Route Generation
Generate URLs in your views using Laravel’s route helpers:API Development
Sistema de Ventas primarily uses web routes with Blade views. For API development, routes can be added to
routes/api.php and authenticated with Laravel Sanctum.Next Steps
Controllers
Learn about controller implementation details
API Overview
Understand the overall API architecture