How can i save only selected data to my database table something like this
// save weekdays
$weekdays = new TrainingDay();
$weekdays->insert($request->weekdays->toArray());
$weekdays->save();
the table only have id, plan_id, weekday, created_at, updated_at
should i use some array_pluck or something?
My sample form submit data
#attributes: array:5 [
"id" => "1"
"plan_id" => "1"
"weekday" => "Trænings dag"
"created_at" => "2018-08-29 17:42:30"
"updated_at" => "2018-08-29 17:42:30"
]