Download the PHP package mrnewport/laravel-stow without Composer

On this page you can find all versions of the php package mrnewport/laravel-stow. 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 laravel-stow

Laravel Stow Package

Overview

Laravel Stow is an unofficial laravel package designed to handle the management of baskets and basket items within a Laravel application. It provides a flexible and extensible solution for handling shopping carts, wishlists, and other similar use cases. This package intentionally avoids pricing and checkout functionality for granularity purposes, focusing solely on the management of items within baskets. If you are looking for a qty based pricelist functionality, keep your eye out for mrnewport/price, my upcoming package.

Installation

To integrate the Laravel Stow package into your Laravel project, execute:

Then, publish and migrate the database tables:

Configuration

Define basket instances and restrictions in config/stow.php to ensure type safety and integrity:

Instances not listed will remain unrestricted, accepting any Stowable models.

Creating Baskets

Instantiate a basket, specifying an optional type (instance name):

Adding Items to Baskets

Add Stowable interface to any models to allow them to be added to baskets:

Add items respecting instance restrictions and options:

Items that are already in the basket will have their quantities incremented only when the item exists with identical options.

Updating Basket Items

Update item details within the basket, this requires the BasketItem or its ID:

Removing Items from Baskets

Remove items from the basket by BasketItem or ID:

Retrieving Basket Items

Retrieve items from the basket:

Merging Baskets

Merge the contents of one basket into another:

Clone Baskets

Clone a basket and its associated items:

Deleting Baskets

Delete a basket and its associated items:

Detailed Events Overview

Here's a look at the events, the objects they provide, and how they can be used:

1. BasketCreatedEvent

2. BasketUpdatedEvent

3. BasketDeletedEvent

4. BasketItemCreatedEvent

5. BasketItemUpdatedEvent

6. BasketItemDeletedEvent

Creating and Registering Custom Listeners

To create a custom listener for any of these events, generate a listener using the Artisan command:

In your custom listener, you can access the event object and its properties:

Register your listener in the EventServiceProvider:

Best Practices and Possible Pitfalls


All versions of laravel-stow with dependencies

PHP Build Version
Package Version
No informations.
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 mrnewport/laravel-stow contains the following files

Loading the files please wait ....