Skip to content

Getting and using $rowId

Luca Sartori edited this page Oct 25, 2016 · 3 revisions

Hey, just wanted to share this, since it got me scratching my head a bit.

To get the rowId, use the following code:

$id    = Input::get('id');
$rows  = Cart::content();
$rowId = $rows->where('id', $id)->first()->rowId;

And if you want to access the data in that row, use this:

$item = Cart::get($rowId);

With this, you can now ask for $item->name, $item->qty, $item->price, etc.

Clone this wiki locally