Download the PHP package ilbronza/products without Composer
On this page you can find all versions of the php package ilbronza/products. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ilbronza/products
More information about ilbronza/products
Files in ilbronza/products
Package products
Short Description :package_description
License MIT
Homepage https://github.com/ilbronza/products
Informations about the package products
Products
Suppliers Creation from Standard Models
This package now includes a helper feature that allows you to create Suppliers directly from existing Eloquent models.
How it works
Any Eloquent model can be converted into a Supplier by invoking the SupplierCreatorHelper.
The system will automatically generate the corresponding Supplier entry, linking it to the source model through its class name and primary key.
Example Usage
Notes
- If a Supplier for the given model already exists, the factory will return it instead of creating a duplicate.
- The Supplier inherits descriptive fields from the model whenever possible.
- This feature is intended to simplify the integration of existing domain models into the Products package.
Sellables Creation from Standard Models
This package now includes a helper feature that allows you to create Sellables directly from existing Eloquent models.
How it works
Any Eloquent model can be converted into a Sellable by invoking the SellableCreatorHelper.
The system will automatically generate the corresponding Sellable entry, linking it to the source model through its class name and primary key.
Example Usage
Notes
- If a Sellable for the given model already exists, the factory will return it instead of creating a duplicate.
- The Sellable inherits descriptive fields from the model whenever possible.
- This feature is intended to simplify the integration of existing domain models into the Products package.
Sellable prices creation from Target Model
call this route
it will execute ProductCalculatePricesController@calculatePrices
SellablePricesCreatorHelper::calculatePricesByTarget takes the product, call $product->getPriceBaseAttributes() and populate all sellable prices.
for example if you declare getPriceBaseAttributes like this:
product sellables will have a company_cost and a client_price