ProductOptionValue
class ProductOptionValue extends BaseModel implements HasMedia (View source)
Traits
Properties
protected array | $casts | Define which attributes should be cast. |
|
protected array | $guarded | Define which attributes should be protected from mass assignment. |
|
int | $id | ||
int | $product_option_id | ||
string | $name | ||
int | $position | ||
Carbon | $created_at | ||
Carbon | $updated_at |
Methods
Get new instance of the registered model.
Handle dynamic and static method calls into the model.
Forward a method call to the model only when calling a method on the model.
Register a model event with the dispatcher.
Fire the given event for the model.
Remove all the event listeners for the model.
Translate a given attribute based on passed locale.
Translate a value from attribute data.
Handle dynamic static method calls into the model.
Return a new factory instance for the model.
No description
No description
No description
No description
Details
Model
newInstance(array $attributes = [], bool $exists = false)
Get new instance of the registered model.
mixed
__call(string $method, array $parameters)
Handle dynamic and static method calls into the model.
Model
swap(string $newModelClass)
Swap the model implementation.
string
getMorphClass()
Get the class name of the base model.
protected bool
forwardCallsWhen(string $method, Model $model)
Forward a method call to the model only when calling a method on the model.
static protected void
registerModelEvent(string $event, QueuedClosure|Closure|string $callback)
Register a model event with the dispatcher.
protected mixed
fireModelEvent(string $event, bool $halt = true)
Fire the given event for the model.
static void
flushEventListeners()
Remove all the event listeners for the model.
__construct(array $attributes = [])
Create a new instance of the Model.
MorphOne
thumbnail()
Relationship for thumbnail.
void
registerMediaCollections()
No description
void
registerMediaConversions(Media $media = null)
No description
string
translate(string $attribute, string $locale = null)
Translate a given attribute based on passed locale.
string
translateAttribute(string $attribute, string $locale = null)
Translate a value from attribute data.
void
attr(...$params)
Shorthand to translate an attribute.
static mixed
__callStatic(string $method, array $parameters)
Handle dynamic static method calls into the model.
static protected ProductOptionValueFactory
newFactory()
Return a new factory instance for the model.
protected
setNameAttribute($value)
No description
getNameAttribute($value)
No description
option()
No description
variants()
No description