I am trying to pass a value from the controller to my view, it keeps showing that the variable is not defined. how do i solve it ?
public function showItemPage(Order $order)
{
$products = Product::all();
$items=$order->packages[0];
$bidSessions = BidSession::find($items->bid_session_id)->get();
return view('app.order.item', array('order' => $order,'products' => $products) , compact("bidSessions"));
}
When log:info($bidSessions), it shows that I have the data.
{
"id":1528,
"page_id":1,
"name":"Test Steven",
"user_id":1,
"channel":"facebook_live",
"video_id":"486698512444605",
"video_url":"https:\/\/www.facebook.com\/ricksmanfishmarket\/videos\/486698512444605\/",
"data":{
"standalone":"no"
},
"start_date":1621332720,
"end_date":null,
"ended_at":1621333018,
"created_at":"1621332887",
"updated_at":"1621333018",
"deleted_at":null
}
but when I want to display it
<p> </p>
This errors shows up
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire