class ProductsManager extends Manager

Methods

array
fillable()

Define the fillable fields.

Model
makeFillable(Model $model)

Set fillable fields for the given model.

from Manager
__construct()

Create a new manager instance.

withoutGlobalScopes()

Remove all global scopes.

Product
create(array $data, Producer $producer)

Add a new product.

Product
fromId(int $id, array $with = [])

Find a product by id.

Collection
fromProducer(Producer $producer, array $with = [])

Get the given producers products.

Product
update(Product $product, array $data)

Update the given product.

Details

at line 92
protected array fillable()

Define the fillable fields.

.

Return Value

array

in Manager at line 20
protected Model makeFillable(Model $model)

Set fillable fields for the given model.

Parameters

Model $model

Return Value

Model

at line 13
__construct()

Create a new manager instance.

at line 23
ProductsManager withoutGlobalScopes()

Remove all global scopes.

Return Value

ProductsManager

at line 37
Product create(array $data, Producer $producer)

Add a new product.

Parameters

array $data
Producer $producer

Return Value

Product

at line 55
Product fromId(int $id, array $with = [])

Find a product by id.

Parameters

int $id
array $with

Return Value

Product

at line 67
Collection fromProducer(Producer $producer, array $with = [])

Get the given producers products.

Parameters

Producer $producer
array $with

Return Value

Collection

at line 79
Product update(Product $product, array $data)

Update the given product.

Parameters

Product $product
array $data

Return Value

Product