It's not fundamentally different, but using array_map gives you a cleaner syntax:
$ids = Input::get('some_id');
$status = Input::get('status');
$modelData = array_map($ids, function($id) use($status)
{
return array(
'some_id' => $id,
'status' => $status
);
});
SomeModel::create($modelData);
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community