I'm using model and i want to select the data from table then only get the value. I've tried this :
Rental::create([
'id_bike' => $request->id,
'bike_brand' => Bike::where('id', $request->id)->pluck('brand'),
'bike_price' => Bike::where('id', $request->id)->pluck ('price'),
]);
but the result is like this:
["Magni temporibus non et ratione qui consequatur qui."]
[95]
I need the result to be like this:
Magni temporibus non et ratione qui consequatur qui.
95
What can I do?