resources/views/ and organized by feature area. All views extend the main application layout for consistent structure.
View Directory Structure
The application organizes views into the following directories:Main Views
Home
Landing page with featured products and categories
Catalog
Browse and search automotive parts
Cart
Review and manage cart items
Orders
View order history and details
Authentication
Login and registration forms
Home View
Location:resources/views/home/index.blade.php
The homepage is the main landing page featuring:
- Hero Section: Main call-to-action with statistics
- Categories Grid: Browse by product category
- Featured Products: Highlighted automotive parts
- Benefits Section: Key selling points
- CTA Section: Registration prompt
View Structure
Hero Statistics
The hero section displays key metrics (resources/views/home/index.blade.php:36-49):
Product Categories
The homepage displays six main product categories (resources/views/home/index.blade.php:67-118):
- Filtros: 120 products
- Frenos: 85 products
- Eléctrico: 200 products
- Lubricantes: 45 products
- Suspensión: 90 products
- Encendido: 65 products
Catalog View
Location:resources/views/catalogos/catalogo.blade.php
The catalog view displays all available automotive parts with search functionality.
View Implementation
Product Card Example
Each product in the catalog uses this structure (resources/views/catalogos/catalogo.blade.php:36-51):
Stock Status Display
- In Stock
- Out of Stock
Products with available inventory:
Cart View
Location:resources/views/carrito/carrito.blade.php
The cart view allows customers to review items before creating an order.
View Structure
Cart Item Structure
Each cart item includes quantity controls (resources/views/carrito/carrito.blade.php:37-55):
Order Summary
The summary displays pricing breakdown (resources/views/carrito/carrito.blade.php:79-98):
Orders View
Location:resources/views/pedidos/
The orders section includes two views:
- pedido.blade.php: Order listing page
- pedido-detalle.blade.php: Individual order details
Order Detail Route
The order detail view receives an order ID parameter (routes/web.php:29-31):
Authentication Views
Location:resources/views/auth/
Login View
Location:resources/views/auth/login.blade.php
Registration View
Location:resources/views/auth/registro.blade.php
Similar structure to the login view, used for new customer registration.
View Routes
All views are mapped to routes inroutes/web.php:
Data Passing
Route Parameters
Views can receive data through route parameters:View Data
Data is passed to views using arrays:Named Routes
All views use named routes for navigation:View Hierarchy
All main views follow this inheritance pattern:- Base Layout (
layouts/app.blade.php): Defines HTML structure, includes navbar and footer - Feature Views: Extend the base layout and define the content section
- Partial Views: Reusable sections included within feature views
Best Practices
Use Layouts
Always extend the base layout for consistent structure
Named Routes
Use route names instead of hardcoded URLs
Organize by Feature
Group related views in feature directories
Blade Components
Extract reusable UI elements into components