Overview
Dashboard Laravel is built on Laravel 11, following the Model-View-Controller (MVC) architectural pattern. The project provides a comprehensive administrative dashboard for managing clients, sales, invoices, and messages.Directory Structure
The project follows Laravel 11’s standard directory organization:Laravel 11 Architecture
MVC Pattern
Separates application logic into Models (data), Views (presentation), and Controllers (business logic)
Eloquent ORM
Database abstraction layer for object-relational mapping and relationships
Blade Templating
Powerful templating engine with inheritance and component support
Routing System
Clean URL routing with middleware support and named routes
Key Directories
app/ - Application Core
app/ - Application Core
Contains the core application logic:
- Http/Controllers/ - Handles incoming HTTP requests
AuthController.php- Authentication logicController.php- Base controllerHomeController.php- Home page logic
- Models/ - Eloquent models representing database tables
User.php- User authentication modelCliente.php- Client managementVenta.php- Sales recordsFactura.php- Invoice managementMensaje.php- Message system
- Providers/ - Service providers for application bootstrapping
AppServiceProvider.php- Main service provider
resources/ - Frontend Assets
resources/ - Frontend Assets
Contains views and frontend assets:
- views/ - Blade templates (13 total files)
layouts/app.blade.php- Main dashboard layoutlayouts/auth.blade.php- Authentication layouthome.blade.php- Login pagewelcome.blade.php- Dashboard homeclientes.blade.php- Client managementventas.blade.php- Sales managementfacturas.blade.php- Invoice managementmensajes.blade.php- Message center- Plus 5 additional views
- css/ - Stylesheet sources
- js/ - JavaScript sources
routes/ - URL Routing
routes/ - URL Routing
Defines application routes:See
routes/web.php for complete route definitions.database/ - Database Layer
database/ - Database Layer
Database migrations and seeders:
- migrations/ - Database schema definitions
- User tables (authentication)
- Business tables (clientes, ventas, facturas, mensajes)
- System tables (cache, jobs)
- factories/ - Test data factories
- seeders/ - Database seeding for development
public/ - Web Root
public/ - Web Root
Publicly accessible files:
index.php- Application entry pointcss/- Compiled stylesheetsdashboard.css- Main dashboard styles
- Assets served directly to browsers
config/ - Configuration
config/ - Configuration
Framework configuration files:
app.php- Application settingsauth.php- Authentication configurationdatabase.php- Database connectionssession.php- Session management- Plus additional configuration files
File Organization Best Practices
The project follows Laravel 11 conventions for maximum maintainability and team collaboration.
Controllers
Location:app/Http/Controllers/
- One controller per resource or feature area
- Named with descriptive names ending in
Controller - Extend the base
Controllerclass
Models
Location:app/Models/
- One model per database table
- Singular, capitalized naming (e.g.,
Cliente, notClientes) - Define relationships, fillable attributes, and casts
Views
Location:resources/views/
- Organized by feature or section
- Use
.blade.phpextension - Layouts stored in
layouts/subdirectory - Follow naming convention matching route names
Routes
Location:routes/web.php
- Grouped by functionality
- Authentication routes at the top
- Dashboard routes following
- Use named routes for easy reference
Application Flow
- Request hits
public/index.php - Routes in
routes/web.phpmatch URL - Controller method handles business logic
- Model interacts with database via Eloquent
- View renders response using Blade
- Response sent back to browser
Next Steps
Models
Explore Eloquent models and relationships
Controllers
Learn about controller architecture
Views
Understand Blade templating system
