Download the PHP package marshmallow/products without Composer

On this page you can find all versions of the php package marshmallow/products. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package products

alt text

Marshmallow Products

Latest Version on Packagist Total Downloads

Basic building blocks for handling products and preparing them to be used in e-commerce. This package ships the Product, ProductCategory and Supplier models (with prices, SEO, slugs, soft deletes and flexible images) plus matching Laravel Nova resources. It is typically used together with Marshmallow's Cart or Ecommerce packages.

Requirements

Laravel Nova is a paid product. Make sure your Composer is authenticated against https://nova.laravel.com before installing.

Installation

Install the package via Composer:

The service provider is auto-discovered. It registers the package config and loads the package migrations automatically, so a php artisan migrate is all that is needed to create the products, product_categories, suppliers and pivot tables.

Register the product observer in your application's AppServiceProvider::boot() method:

Seed the default VAT rates (provided by marshmallow/priceable) so products can be priced:

Publishing the config

Optionally publish the config file to override the models, Nova resources and defaults:

After installation

Generate the Nova resources for this package (and for the Priceable resources it relies on) using the marshmallow:resource command from marshmallow/commands:

Set your default currency in your .env:

Configuration

The published config/product.php file exposes the following options:

Key Default Description
models.product Marshmallow\Product\Models\Product The Product Eloquent model. Override to use your own.
models.product_category Marshmallow\Product\Models\ProductCategory The ProductCategory Eloquent model.
models.supplier Marshmallow\Product\Models\Supplier The Supplier Eloquent model.
nova.wysiwyg Laravel\Nova\Fields\Trix (env NOVA_WYSIWYG) The Nova field used for the product body.
nova.prices_are_including_vat true Whether prices entered in Nova already include VAT.
nova.defaults.currencies 1 Default currency id used on new prices.
nova.defaults.vat_rates 3 Default VAT rate id used on new prices.
nova.resources Marshmallow\Product\Nova\* The Nova resource classes for product, category and supplier (price resource comes from Priceable).
nova.relationships.product_supplier Marshmallow\Product\Nova\Relationships\ProductSupplier::class The pivot definition for the product/supplier relationship.
default_product_view shop.product The blade view used to render a product detail page.
channels [] Optional sales channels (e.g. Bol.com) to expose the product on.

Usage

The Product model

A Product is sluggable, SEO-able and priceable, uses soft deletes, and casts its images attribute to a Nova Flexible value. It exposes category() (belongs-to), categories() and suppliers() (belongs-to-many) relationships, all resolved through the configurable model classes.

Available scopes

Scope Description
active() Only products where active = 1.
withRelationships() Eager loads category, categories, suppliers and media.

Stock status constants

Security Vulnerabilities

Please report security vulnerabilities by email to [email protected] rather than via the public issue tracker.

Credits

License

The MIT License (MIT). Please see the License File for more information.


All versions of products with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
marshmallow/commands Version ^v1.2.1
marshmallow/seoable Version ^v5.0.1
marshmallow/sluggable Version ^v1.9.0
marshmallow/helpers Version ^v2.19.0
marshmallow/priceable Version ^v3.2.0
marshmallow/nova-flexible Version ^v5.1.0
laravel/nova Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package marshmallow/products contains the following files

Loading the files please wait ...