public deleteBasketAction ( integer $id ) : FOS\RestBundle\View\View | ||
$id | integer | A Basket identifier |
Результат | FOS\RestBundle\View\View |
public function deleteBasketAction($id)
{
$basket = $this->getBasket($id);
try {
$this->basketManager->delete($basket);
} catch (\Exception $e) {
return \FOS\RestBundle\View\View::create(array('error' => $e->getMessage()), 400);
}
return array('deleted' => true);
}