Store extends Model Uses HasFactory, HasSlug, 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 store.
- customers() : belongsToMany
- Get all the customers that have this store.
- daysOff() : hasMany
- Get the days off that belong to this employee.
- deletePictures() : true
- employees() : hasMany
- Get the employees that belong to this store.
- getCategoryServicesAttribute() : string
- Get the services sorted by order.
- getManagerEmailAttribute() : Collection
- Get the email from the manager
- getPromotionsAttribute() : Collection
- Get the promotional services currently in the store.
- 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.
- incomeExpenses() : belongsToMany
- Get all the customers that have this store.
- pictures() : hasMany
- Get the pictures that belong to this store.
- reviews() : HasMany
- Get the reviews that belong to this store
- savePicture() : null
- serviceCategories() : hasMany
- Get the services category that belong to this store.
- services() : hasMany
- Get the services that belong to this store.
- storeCategories() : belongsToMany
- Get all the categorues that have this store.
- storeInvoiceData() : HasOne
- storeInvoices() : HasMany
- storeRedsys() : HasOne
- user() : belongsTo
- Get the user that this store belongs.
- getAttachmentPath() : string
Properties
$appends
The accessors to append to the model's array form.
protected
array<string|int, mixed>
$appends
= []
$casts
The attributes that should be cast.
protected
array<string|int, mixed>
$casts
= ['name' => 'string', 'address' => 'string', 'latitude' => 'float', 'longitude' => 'float', 'slug' => 'string', 'reviews_mean_value' => 'decimal:2', 'playstore_url' => 'string', 'appstore_url' => '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', 'address', 'locality', 'administrative_area_level_2', 'administrative_area_level_1', 'country', 'uuid', 'phone', 'latitude', 'longitude', 'slug', 'premium', 'booking_available', 'billable', 'display_in_listing', 'time_restriction', 'appointment_gap', 'outstanding_balance', 'playstore_url', 'appstore_url']
$hidden
The attributes excluded from the model's JSON form.
protected
array<string|int, mixed>
$hidden
= ['user_id', 'updated_at', 'created_at', 'deleted_at']
$table
The table associated with the model.
protected
string
$table
= "stores"
$with
The attributes that should be cast.
protected
array<string|int, mixed>
$with
= ['pictures', 'storeCategories']
Methods
bookings()
Get the bookings that belong to this store.
public
bookings() : hasMany
Return values
hasMany —customers()
Get all the customers that have this store.
public
customers() : belongsToMany
Return values
belongsToMany —daysOff()
Get the days off that belong to this employee.
public
daysOff() : hasMany
Return values
hasMany —deletePictures()
public
deletePictures() : true
Tags
Return values
true —employees()
Get the employees that belong to this store.
public
employees() : hasMany
Return values
hasMany —getCategoryServicesAttribute()
Get the services sorted by order.
public
getCategoryServicesAttribute(string $value) : string
Parameters
- $value : string
Return values
string —getManagerEmailAttribute()
Get the email from the manager
public
getManagerEmailAttribute() : Collection
Return values
Collection —getPromotionsAttribute()
Get the promotional services currently in the store.
public
getPromotionsAttribute() : Collection
Return values
Collection —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 —incomeExpenses()
Get all the customers that have this store.
public
incomeExpenses() : belongsToMany
Return values
belongsToMany —pictures()
Get the pictures that belong to this store.
public
pictures() : hasMany
Return values
hasMany —reviews()
Get the reviews that belong to this store
public
reviews() : HasMany
Return values
HasMany —savePicture()
public
savePicture( $file, $type) : null
Parameters
Tags
Return values
null —serviceCategories()
Get the services category that belong to this store.
public
serviceCategories() : hasMany
Return values
hasMany —services()
Get the services that belong to this store.
public
services() : hasMany
Return values
hasMany —storeCategories()
Get all the categorues that have this store.
public
storeCategories() : belongsToMany
Return values
belongsToMany —storeInvoiceData()
public
storeInvoiceData() : HasOne
Return values
HasOne —storeInvoices()
public
storeInvoices() : HasMany
Return values
HasMany —storeRedsys()
public
storeRedsys() : HasOne
Return values
HasOne —user()
Get the user that this store belongs.
public
user() : belongsTo
Return values
belongsTo —getAttachmentPath()
private
getAttachmentPath() : string