Overview
TheVehiculo model represents vehicles in the VIP2CARS system. It stores vehicle details such as license plate, make, model, and year, and maintains the relationship with the vehicle’s owner (Cliente).
Database Configuration
Database table name
Primary key column name
Fillable Attributes
The following attributes can be mass-assigned:Vehicle’s license plate number
Vehicle’s brand/manufacturer (e.g., Toyota, Ford, Honda)
Vehicle’s model name
Year of manufacture (4-digit format)
Foreign key referencing the owner (Cliente)
Relationships
cliente()
Defines a many-to-one relationship with the Cliente model. Each vehicle belongs to one client. Relationship Type:belongsTo
Related Model: App\Models\Cliente
Foreign Key: id_cliente
Owner Key: id_cliente
Usage Examples
Model Source
Location:app/Models/Vehiculo.php
View Full Model Source Code
View Full Model Source Code
Related Documentation
- Cliente Model - Related client model
- VehiculoController - Controller handling vehicle operations