public function post_import() { $input = Input::all(); // validasi input apakah sesuai rules (cek di model "suratkeluar") $validation = Suratkeluar::validate_import($input); if ($validation->fails()) { return Redirect::to_route('suratkeluar_massal')->with_errors($validation)->with_input(); } else { $file = Input::get('csv_file'); $sk = Suratkeluar::upload_create($file, $input); // redirect dengan message return Redirect::to_route('suratkeluar')->with('message', $sk); } }