Documentation

Booking extends Model Uses HasFactory

Table of Contents

$appends  : array<string|int, mixed>
The accessors to append to the model's array form.
$casts  : array<string|int, mixed>
The attributes that should be cast.
$fillable  : array<string|int, mixed>
The attributes that are mass assignable.
$hidden  : array<string|int, mixed>
The attributes excluded from the model's JSON form.
$table  : string
The table associated with the model.
$with  : array<string|int, mixed>
Will be included in with this model information
bookingHistoric()  : HasMany
Get the booking history that belong to this booking
boot()  : mixed
customer()  : BelongsTo
Get the customer which owns this booking.
employee()  : BelongsTo
Get the employee which owns this booking.
getEmployeeAttribute()  : object
Gets the employee associated to the booking
getServiceAttribute()  : object
Gets the service associated to the booking
getStoreAttribute()  : object
Gets the store associated to the booking
review()  : HasOne
Get the review that belong to this booking
service()  : BelongsTo
Get the service which owns this booking.
store()  : BelongsTo
Gets the store which owns the booking.

Properties

$appends

The accessors to append to the model's array form.

protected array<string|int, mixed> $appends = ['employee', 'service']

$casts

The attributes that should be cast.

protected array<string|int, mixed> $casts = ['datetime' => 'datetime:Y-m-d H:i', 'status' => 'string', 'reminded' => 'boolean']

$fillable

The attributes that are mass assignable.

protected array<string|int, mixed> $fillable = ['store_id', 'service_id', 'employee_id', 'customer_id', 'datetime', 'status', 'customer_comment', 'store_comment', 'internal_comment', 'autobooking', 'reminded']

$hidden

The attributes excluded from the model's JSON form.

protected array<string|int, mixed> $hidden = ['token', 'updated_at', 'created_at', 'deleted_at', 'internal_comment']

$table

The table associated with the model.

protected string $table = "bookings"

$with

Will be included in with this model information

protected array<string|int, mixed> $with = ['customer', 'review']

Methods

bookingHistoric()

Get the booking history that belong to this booking

public bookingHistoric() : HasMany
Return values
HasMany

boot()

public static boot() : mixed
Return values
mixed

customer()

Get the customer which owns this booking.

public customer() : BelongsTo
Return values
BelongsTo

employee()

Get the employee which owns this booking.

public employee() : BelongsTo
Return values
BelongsTo

getEmployeeAttribute()

Gets the employee associated to the booking

public getEmployeeAttribute() : object
Return values
object

getServiceAttribute()

Gets the service associated to the booking

public getServiceAttribute() : object
Return values
object

getStoreAttribute()

Gets the store associated to the booking

public getStoreAttribute() : object
Return values
object

review()

Get the review that belong to this booking

public review() : HasOne
Return values
HasOne

service()

Get the service which owns this booking.

public service() : BelongsTo
Return values
BelongsTo

store()

Gets the store which owns the booking.

public store() : BelongsTo
Return values
BelongsTo

Search results