Documentation

Customer extends Model Uses HasFactory, SoftDeletes

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>
The attributes that should be cast.
bookings()  : hasMany
Get the bookings that belong to this customer.
getCommentAttribute()  : string
Get the comment from this customer and store
getEmailAttribute()  : string
Get the email from this customer
getNameAttribute()  : string
Get the name from model User
getPhoneAttribute()  : string
Get the email from this customer
getPictureAttribute()  : string
Get the img url.
stores()  : belongsToMany
Get all the stores that have this customer.
user()  : belongsTo
Get the user that this customer belong.

Properties

$appends

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

protected array<string|int, mixed> $appends = ['name', 'email', 'phone', 'picture']

$casts

The attributes that should be cast.

protected array<string|int, mixed> $casts = ['type' => 'integer']

$fillable

The attributes that are mass assignable.

protected array<string|int, mixed> $fillable = ['type', 'external_client_id', 'phone', 'address', 'postal_code', 'city', 'province']

$hidden

The attributes excluded from the model's JSON form.

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

$table

The table associated with the model.

protected string $table = "customers"

$with

The attributes that should be cast.

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

Methods

bookings()

Get the bookings that belong to this customer.

public bookings() : hasMany
Return values
hasMany

getCommentAttribute()

Get the comment from this customer and store

public getCommentAttribute() : string
Return values
string

getEmailAttribute()

Get the email from this customer

public getEmailAttribute() : string
Return values
string

getNameAttribute()

Get the name from model User

public getNameAttribute() : string
Return values
string

getPhoneAttribute()

Get the email from this customer

public getPhoneAttribute() : string
Return values
string

getPictureAttribute()

Get the img url.

public getPictureAttribute() : string
Return values
string

stores()

Get all the stores that have this customer.

public stores() : belongsToMany
Return values
belongsToMany

user()

Get the user that this customer belong.

public user() : belongsTo
Return values
belongsTo

Search results