I wanted to retrieve session array and put into other model But throws `
Call to a member function pluck() on array
Controller I used :
$orders = $request->session()->get('order');
$order = new Order();
$order->school_id = $orders->pluck('school_id');
$order->order_date = $orders->pluck('order_date');
$order->time_slot = $orders->pluck('time_slot');
How do i access the session data and put into other model?
Here is the response I get when i dd() the session :
array:1 [▼
0 => array:3 [▼
"school_id" => "4"
"order_date" => "11/25/2017"
"time_slot" => "10am - 8pm"
]
]
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire