Travel extends Model Uses HasFactory, SoftDeletes
Table of Contents
- $appends : mixed
- Attributes included when receiving model instance.
- $casts : mixed
- $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 modules of the item.
- airport() : mixed
- Get the airport of the item.
- boards_upgrades() : mixed
- Get the boards upgrades of the item.
- checkStock() : bool
- Check if a travel stay have stock
- customer() : mixed
- Get the captain/tourguide of the travel.
- flights() : mixed
- Get the flights of the item.
- getMinPriceAttribute() : array<string|int, mixed>|null
- Establish the value of min_price attribute. Minimun price of active stays related
- getPublicVehiclesAttribute() : array<string|int, mixed>|null
- Establish the value of public_vehicles attribute. Vehicles related with travel's car rental office
- hotels_board() : mixed
- Get the hotels_board of the item.
- hotels_category() : mixed
- Get the hotels_category of the item.
- picture() : mixed
- Get the pictures of the item.
- pictures() : mixed
- Get the pictures of the item.
- showOccupiedStock() : mixed
- Show number of available stock that a travel stay have
- stays() : mixed
- Get the stays of the item.
- travel_categories() : mixed
- Get the TravelCategory of the item.
- travels_region() : mixed
- Get the travels_region of the item.
- travels_super_region() : mixed
- Get the travels_super_region of the item.
- vehicle() : mixed
- Get the Vehicle of the item.
- vehicleLocation() : mixed
- Get the VehicleLocation of the item.
- vehicleRentalCompany() : mixed
- Get the Vehicle Rental Company of the item.
- boot() : mixed
- getUniqueBookings() : int|mixed
- Get all booking that have this stay
Properties
$appends
Attributes included when receiving model instance.
protected
mixed
$appends
= ['public_vehicles', 'min_price']
$casts
protected
mixed
$casts
= ['card' => 'array']
$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
= ['code', 'airport_id', 'travels_region_id', 'hotels_board_id', 'hotels_category_id', 'travels_super_region_id', 'title', 'summary', 'card', 'description', 'hotel', 'duration', 'teaser', 'overall_rating', 'visible_in_mainpage', 'public_visibility', 'custom_order', 'vehicle_location_id', 'customer_id', 'vehicle_rental_company_id', 'vehicle_id']
$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', 'airport_id', 'travels_region_id', 'hotels_board_id', 'hotels_category_id', 'travels_super_region_id', 'created_at', 'updated_at', 'deleted_at', 'travel_categories']
$table
The table associated with the model.
protected
string
$table
= "travels"
$with
The extra attributes that should be showed for arrays.
protected
array<string|int, mixed>
$with
= ['airport', 'boards_upgrades', 'flights', 'hotels_board', 'hotels_category', 'pictures', 'travels_region', 'travels_super_region', 'stays']
Methods
agency()
Get the modules of the item.
public
agency() : mixed
Return values
mixed —airport()
Get the airport of the item.
public
airport() : mixed
Return values
mixed —boards_upgrades()
Get the boards upgrades of the item.
public
boards_upgrades() : mixed
Return values
mixed —checkStock()
Check if a travel stay have stock
public
checkStock( $room_types_id, $start, $end) : bool
Parameters
Return values
bool —customer()
Get the captain/tourguide of the travel.
public
customer() : mixed
Return values
mixed —flights()
Get the flights of the item.
public
flights() : mixed
Return values
mixed —getMinPriceAttribute()
Establish the value of min_price attribute. Minimun price of active stays related
public
getMinPriceAttribute() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —getPublicVehiclesAttribute()
Establish the value of public_vehicles attribute. Vehicles related with travel's car rental office
public
getPublicVehiclesAttribute() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —hotels_board()
Get the hotels_board of the item.
public
hotels_board() : mixed
Return values
mixed —hotels_category()
Get the hotels_category of the item.
public
hotels_category() : mixed
Return values
mixed —picture()
Get the pictures of the item.
public
picture() : mixed
Return values
mixed —pictures()
Get the pictures of the item.
public
pictures() : mixed
Return values
mixed —showOccupiedStock()
Show number of available stock that a travel stay have
public
showOccupiedStock( $room_types_id, $start, $end) : mixed
Parameters
Return values
mixed —stays()
Get the stays of the item.
public
stays() : mixed
Return values
mixed —travel_categories()
Get the TravelCategory of the item.
public
travel_categories() : mixed
Return values
mixed —travels_region()
Get the travels_region of the item.
public
travels_region() : mixed
Return values
mixed —travels_super_region()
Get the travels_super_region of the item.
public
travels_super_region() : mixed
Return values
mixed —vehicle()
Get the Vehicle of the item.
public
vehicle() : mixed
Return values
mixed —vehicleLocation()
Get the VehicleLocation of the item.
public
vehicleLocation() : mixed
Return values
mixed —vehicleRentalCompany()
Get the Vehicle Rental Company of the item.
public
vehicleRentalCompany() : mixed
Return values
mixed —boot()
protected
static boot() : mixed
Return values
mixed —getUniqueBookings()
Get all booking that have this stay
private
getUniqueBookings( $end, $start, $room_types_id) : int|mixed
Parameters
- $end :
-
String - End date of the travel
- $start :
-
String - Start date of the travel
- $room_types_id :
-
integer