Method |
Description |
|
category ( ) |
|
|
getChildsAttribute ( ) : collection |
Return a collection of a category's childs, or null if don't have. |
|
getParentAttribute ( ) : app\category |
Return the parent of a category, or null if don't have. |
|
getParentTreeAttribute ( ) : app\category |
Return the the full tree of parents of a category, or null if don't have. |
|
hasChildren ( ) |
|
|
hasChilds ( ) |
|
|
hasParent ( ) |
|
|
newCollection ( array $models = [] ) : App\Collection\Categories |
Override Collection Method. |
|
parentsTree ( [int] $id, [array] &$array, [array] $fields = ['id', 'category_id', 'name'] ) |
parentsTree
Retrieve all the categories parents of one passed through parameter,
checking data from bottom to top. |
|
product ( ) |
|
|
progeny ( [int] $id, &$list, [array] $fields = ['id', 'name'] ) |
progeny
Retrieve all the categories children of one passed through parameter,
checking data from bottom to top. |
|
scopeActives ( $query ) |
|
|
scopeByName ( $query ) |
|
|
scopeChildsOf ( $query, $id ) |
scopeChildsOf
Return all the children of a category. If the id is empty, 'parents' or 'others' will be given. |
|
scopeFull ( [type] $query ) : [type] |
scopeFull
Retrieve the total of products contained in a category. |
|
scopeGroup ( $query ) |
|
|
scopeInactives ( $query ) |
|
|
scopeLightSelection ( [object] $query ) |
scopeLightSelection
Retrieve build the query select as scope. |
|
scopeMothers ( [type] $query ) : [type] |
scopeMothers
Retrieve the main categories. |
|
scopeSearch ( $query, $name ) |
|
|
scopeStore ( $query ) |
|
|
withChilds ( ) |
|
|
withFamilyTree ( $value = true ) |
|
|
withParentTree ( ) |
|
|