Employee 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.
- $dates : array<string|int, mixed>
- Column for soft deletes
- $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 employee.
- daysOff() : hasMany
- Get the days off that belong to this employee.
- getEmailAttribute() : string
- getIsManagerAttribute() : string
- Get the role
- getNameAttribute() : string
- getPhoneAttribute() : mixed
- Get the phone for user if customer.
- getPictureAttribute() : string
- Get the img url.
- getUserAttribute() : object
- Get the user data.
- services() : belongsToMany
- Get all the services that have this employee.
- store() : belongsTo
- Get the store that this employee belong.
- timetables() : hasMany
- Get the timetables that belong to this employee.
- user() : belongsTo
- Get the user that this employee belong.
- validSchedule() : Attribute
- Interact with the date attribute.
Properties
$appends
The accessors to append to the model's array form.
protected
array<string|int, mixed>
$appends
= ['name', 'email', 'picture', 'phone', 'isManager']
$casts
The attributes that should be cast.
protected
array<string|int, mixed>
$casts
= ['gender' => 'string']
$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
= ['gender', 'valid_schedule']
$hidden
The attributes excluded from the model's JSON form.
protected
array<string|int, mixed>
$hidden
= ['user_id', 'store_id', 'updated_at', 'created_at', 'deleted_at', 'pivot']
$table
The table associated with the model.
protected
string
$table
= "employees"
$with
The attributes that should be cast.
protected
array<string|int, mixed>
$with
= []
Methods
bookings()
Get the bookings that belong to this employee.
public
bookings() : hasMany
Return values
hasMany —daysOff()
Get the days off that belong to this employee.
public
daysOff() : hasMany
Return values
hasMany —getEmailAttribute()
public
getEmailAttribute() : string
Tags
Return values
string —getIsManagerAttribute()
Get the role
public
getIsManagerAttribute() : string
Return values
string —getNameAttribute()
public
getNameAttribute() : string
Tags
Return values
string —getPhoneAttribute()
Get the phone for user if customer.
public
getPhoneAttribute() : mixed
Return values
mixed —getPictureAttribute()
Get the img url.
public
getPictureAttribute() : string
Return values
string —getUserAttribute()
Get the user data.
public
getUserAttribute() : object
Return values
object —services()
Get all the services that have this employee.
public
services() : belongsToMany
Return values
belongsToMany —store()
Get the store that this employee belong.
public
store() : belongsTo
Return values
belongsTo —timetables()
Get the timetables that belong to this employee.
public
timetables() : hasMany
Return values
hasMany —user()
Get the user that this employee belong.
public
user() : belongsTo
Return values
belongsTo —validSchedule()
Interact with the date attribute.
protected
validSchedule() : Attribute