public function store(GuestRequest $request) { //Guest::create($request->all()); $input = Input::all(); foreach ($input as $key => $value) { $data[] = array("fname" => 'fname'[$value], "lname" => 'lname'[$value], "event_id" => 'event_id'[$value]); } Guest::insert($data); return redirect('events')->with('flash_message', trans('response.created')); }