vendredi 23 mars 2018

How to fetch value from variable in laravel?

$product=ProductCatalog::where(['campaign_id' => $campaign_id])->get();
print($product);

OUTPUT:

[{"id":7,"campaign_id":64,"product_id":26,"created_at":"2018-03-20 10:29:51","updated_at":"2018-03-20 10:29:51"},{"id":8,"campaign_id":64,"product_id":27,"created_at":"2018-03-20 10:30:26","updated_at":"2018-03-20 10:30:26"}]

From $product i want to fetch value of product_id

How to fetch value from $product?

please help me with this problem...



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire