Vehicle extends Model Uses SoftDeletes
Table of Contents
- $dates : array<string|int, mixed>
- Column for soft deletes
- $fillable : array<string|int, mixed>
- The attributes that are mass assignable.
- $guarded : array<string|int, mixed>
- The attributes that are not mass assignable.
- $hidden : array<string|int, mixed>
- The attributes that should be hidden for arrays.
- $table : string
- The table associated with the model.
- $with : array<string|int, mixed>
- The extra attributes that should be showed for arrays.
- agency() : mixed
- Get the agency of the item.
- bookings() : mixed
- Get the bookings of the item.
- generatePriceCommissionAndKilometres() : int
- getVATFromLocation() : float
- offices() : mixed
- Get the location of the vehicle.
- plates() : mixed
- Get the plates of the vehicle.
- prices() : mixed
- Get the office of the vehicle.
- vehicleExtra() : BelongsToMany
- vehicleRentalCompany() : mixed
- Get the Vehicle Rental Company of the vehicle.
Properties
$dates
Column for soft deletes
protected
array<string|int, mixed>
$dates
= ["deleted_at"]
$fillable
The attributes that are mass assignable.
protected
array<string|int, mixed>
$fillable
= ['agency_id', 'name', 'active', 'external_id', 'stock', 'uuid', 'type', 'subtype', 'seats', 'luggage', 'doors', 'transmission', 'emission', 'fuel_type', 'bodywork', 'age', 'max_kilometres', 'booking_price', 'description', 'conditions', 'under_request', 'promotional_text', 'extra_km_cost', 'only_credit', 'vehicle_rental_company_id', 'vehicle_office_id', 'items_included', 'items_excluded', 'deposit']
$guarded
The attributes that are not mass assignable.
protected
array<string|int, mixed>
$guarded
= ["id", "created_at", "updated_at", "deleted_at"]
$hidden
The attributes that should be hidden for arrays.
protected
array<string|int, mixed>
$hidden
= ['agency_id', 'created_at', 'updated_at', 'deleted_at']
$table
The table associated with the model.
protected
string
$table
= "vehicles"
$with
The extra attributes that should be showed for arrays.
protected
array<string|int, mixed>
$with
= ['prices', 'plates', 'vehicleExtra']
Methods
agency()
Get the agency of the item.
public
agency() : mixed
Return values
mixed —bookings()
Get the bookings of the item.
public
bookings() : mixed
Return values
mixed —generatePriceCommissionAndKilometres()
public
generatePriceCommissionAndKilometres(mixed $start_date, mixed $end_date[, mixed $vat = null ][, mixed $differentDestination = false ]) : int
Parameters
- $start_date : mixed
- $end_date : mixed
- $vat : mixed = null
- $differentDestination : mixed = false
Tags
Return values
int —getVATFromLocation()
public
getVATFromLocation(string $locationID[, mixed $public = false ]) : float
Parameters
- $locationID : string
-
- Integer with id or UUID
- $public : mixed = false
Tags
Return values
float —offices()
Get the location of the vehicle.
public
offices() : mixed
Return values
mixed —plates()
Get the plates of the vehicle.
public
plates() : mixed
Return values
mixed —prices()
Get the office of the vehicle.
public
prices() : mixed
Return values
mixed —vehicleExtra()
public
vehicleExtra() : BelongsToMany
Return values
BelongsToMany —vehicleRentalCompany()
Get the Vehicle Rental Company of the vehicle.
public
vehicleRentalCompany() : mixed