mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Little change to readme
This commit is contained in:
@@ -37,7 +37,7 @@ Look at one of the following topics to learn more about LaravelShoppingcart
|
||||
* [Usage](#usage)
|
||||
* [Collections](#collections)
|
||||
* [Instances](#instances)
|
||||
* [Associate a model](#models)
|
||||
* [Models](#models)
|
||||
* [Exceptions](#exceptions)
|
||||
* [Events](#events)
|
||||
* [Example](#example)
|
||||
@@ -221,7 +221,7 @@ N.B. Keep in mind that the cart stays in the last set instance for as long as yo
|
||||
|
||||
N.B.2 The default cart instance is called `main`, so when you're not using instances,`Cart::content();` is the same as `Cart::instance('main')->content()`.
|
||||
|
||||
## Associate a model
|
||||
## Models
|
||||
A new feature is associating a model with the items in the cart. Let's say you have a `Product` model in your application. With the new `associate()` method, you can tell the cart that an item in the cart, is associated to the `Product` model.
|
||||
|
||||
That way you can access your model right from the `CartRowCollection`!
|
||||
|
||||
Reference in New Issue
Block a user