I have a single column in db named session and I want to insert all below data in single column in a form of array.
data available in array
array:1 [▼
0 => array:3 [▼
"_token" => "ENzbpMgvlOhMkwE1Fv13hjn9NlCOUolIFBDZ4wJd"
"session_start" => "2000-01-01"
"session_end" => "2002-01-01"
]
]
I tried below
public function store(Request $request)
{
$arr = (array($request->all()));
$create = SchoolSession::create($arr));
}
getting an error: Array to string conversion
Please advise the solution and also advise how to fetch the same from db and show seperately.