Skip to main content

Update

Updates a specific product.

Examples

All at once:

$product = \SureCart\Models\Product::find('8ba8d60f-5277-4e6b-807c-dee8166446d5');
$product->update([
'name' => 'New name',
'description' => 'New description',
]);

Wait until attributes are updated:

$product = \SureCart\Models\Product::find('8ba8d60f-5277-4e6b-807c-dee8166446d5');
$product->name = 'New name';
$product->descriptoin = 'New description';
$product->save();

Update Attributes

Response Attributes