Метод |
Описание |
|
addAssemblyItem ( Model $part, integer | float | string $quantity = 1, array $extra = [] ) |
Adds an item to the current assembly. |
|
addAssemblyItems ( array $parts, integer | float | string $quantity = 1, array $extra = [] ) : integer |
Adds multiple parts to the current items assembly. |
|
assemblies ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
The hasMany assemblies relationship. |
|
assembliesRecursive ( ) : Illuminate\Database\Eloquent\Relations\BelongsToMany |
The belongsToMany recursive assemblies relationship. |
|
forgetCachedAssemblyItems ( ) : boolean |
Removes the current items assembly items
from the cache. |
|
getAssemblyItems ( boolean $recursive = true ) : Illuminate\Database\Eloquent\Collection |
Returns all of the assemblies items. If recursive
is true, the entire nested assemblies collection
is returned. |
|
getAssemblyItemsList ( boolean $recursive = true, integer $depth ) : array |
Returns all of the assemblies items in an
easy to work with array. |
|
getCachedAssemblyItems ( ) : boolean | Illuminate\Database\Eloquent\Collection |
Returns the current cached items assembly if
it exists inside the cache. Returns false
otherwise. |
|
hasCachedAssemblyItems ( ) : boolean |
Returns true / false if the current item
has a cached assembly. |
|
makeAssembly ( ) |
Makes the current item an assembly. |
|
removeAssemblyItem ( integer | string | Model $part ) : boolean |
Removes the specified part from
the current items assembly. |
|
removeAssemblyItems ( array $parts ) : integer |
Removes multiple parts from the current items assembly. |
|
scopeAssembly ( Builder $query ) : mixed |
Scopes the current query to only retrieve
inventory items that are an assembly. |
|
updateAssemblyItem ( integer | string | Model $part, integer | float | string $quantity = 1, array $extra = [] ) |
Updates the inserted parts quantity for the current
item's assembly. |
|
updateAssemblyItems ( array $parts, integer | float | string $quantity, array $extra = [] ) : integer |
Updates multiple parts with the specified quantity. |
|