vendredi 8 septembre 2017

How to remove array element from Session Laravel

I wanted to remove specific array element from in Session. I have products in Session where it has multiple product. Now i wanted to remove a specific product from products Session. I used the following controller. But it can't remove the that specific product from products in Session. How do i remove specific array element?

public function deleteEnquote($id)
    {
      $product = Product::where('id',$id)->first();
      unset($product['product']);
      return redirect('enquote');
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire