ServiceCategory extends Model Uses HasFactory, HasSlug, SoftDeletes
Table of Contents
- $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.
- getRouteKeyName() : string
- Get the route key for the model.
- getServicesAttribute() : string
- Get the services sorted by order.
- getSlugOptions() : SlugOptions
- Get the options for generating the slug.
- services() : hasMany
- Get the services that belong to this services category.
- store() : belongsTo
- Get the store that have this services category.
Properties
$casts
The attributes that should be cast.
protected
array<string|int, mixed>
$casts
= ['name' => 'string', 'description' => 'string', 'slug' => '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
= ['name', 'description', 'slug']
$hidden
The attributes excluded from the model's JSON form.
protected
array<string|int, mixed>
$hidden
= ['store_id', 'updated_at', 'created_at', 'deleted_at']
$table
The table associated with the model.
protected
string
$table
= "service_categories"
Methods
getRouteKeyName()
Get the route key for the model.
public
getRouteKeyName() : string
Return values
string —getServicesAttribute()
Get the services sorted by order.
public
getServicesAttribute(string $value) : string
Parameters
- $value : string
Return values
string —getSlugOptions()
Get the options for generating the slug.
public
getSlugOptions() : SlugOptions
Return values
SlugOptions —services()
Get the services that belong to this services category.
public
services() : hasMany
Return values
hasMany —store()
Get the store that have this services category.
public
store() : belongsTo