HasCustomerGroups
trait HasCustomerGroups (View source)
Traits
Methods
validateScheduling(Collection $models)
No description
void
void
unschedule(Relation $relation, mixed $models, array $pivotData = [])
Unschedule models for a relation.
Relation
customerGroups()
Get the relationship for the customer groups.
void
scheduleCustomerGroup(mixed $models, DateTime $starts = null, DateTime $ends = null, array $pivotData = [])
Schedule models against customer groups.
void
unscheduleCustomerGroup(mixed $models, array $pivotData = [])
Unschedule models against a customer group.
Builder
applyCustomerGroupScope(Builder $query, Collection $groupIds, DateTime $startsAt, DateTime $endsAt)
Apply customer group scope.
Builder
scopeCustomerGroup(Builder $query, CustomerGroup|iterable $customerGroup = null, DateTime $startsAt = null, DateTime $endsAt = null)
Apply the customer group scope
Details
protected
validateScheduling(Collection $models)
No description
protected void
schedule(Relation $relation, mixed $models, DateTime $starts = null, DateTime $ends = null, array $pivotData = [])
Schedule models for a given relation.
protected void
unschedule(Relation $relation, mixed $models, array $pivotData = [])
Unschedule models for a relation.
abstract Relation
customerGroups()
Get the relationship for the customer groups.
void
scheduleCustomerGroup(mixed $models, DateTime $starts = null, DateTime $ends = null, array $pivotData = [])
Schedule models against customer groups.
void
unscheduleCustomerGroup(mixed $models, array $pivotData = [])
Unschedule models against a customer group.
Builder
applyCustomerGroupScope(Builder $query, Collection $groupIds, DateTime $startsAt, DateTime $endsAt)
Apply customer group scope.