Exemple #1
0
     return View::make('cvbuilder.section_views.language', array("langs" => $langs, "levels" => $levels, "abilities" => $abilities));
 });
 Route::post('/fetch_workex', 'CVController@postWorkex');
 Route::post('/fetch_education', 'CVController@postEducation');
 Route::post('/fetch_nysc', 'CVController@postNysc');
 Route::post('/fetch_language', 'CVController@postLanguage');
 Route::post('/save', 'CVController@postProfile');
 Route::get('/fetch_ui_section', function () {
     return View::make('cvbuilder.section_views.add_new_section');
 });
 Route::get('/edit_ui_section/{id}', function ($id) {
     $section = Section::find($id);
     return View::make('cvbuilder.section_views.edit_new_section', ['section' => $section]);
 });
 Route::get('/edit_ui_workex/{id}', function ($id) {
     $work = WorkExperience::find($id);
     return View::make('cvbuilder.section_views.edit_work', ['work' => $work]);
 });
 Route::get('/edit_ui_education/{id}', function ($id) {
     $education = Education::find($id);
     return View::make('cvbuilder.section_views.edit_education', ['edu' => $education]);
 });
 Route::get('/edit_ui_nysc/{id}', function ($id) {
     $nysc = Nysc::find($id);
     return View::make('cvbuilder.section_views.edit_nysc', ['nysc' => $nysc]);
 });
 Route::get('/edit_ui_language/{id}', function ($id) {
     $language = Language::find($id);
     $langs = DB::table('langs')->lists('language', 'id');
     $langs = array("0" => "Select") + $langs + array("-1" => "Others");
     $levels = DB::table('levels')->lists('level', 'id');
Exemple #2
0
 public function putWork()
 {
     $cre = ['title' => Input::get('title'), 'company' => Input::get('company'), 'location' => Input::get('location')];
     $rules = ['title' => 'required', 'company' => 'required', 'location' => 'required'];
     $validator = Validator::make($cre, $rules);
     if ($validator->passes()) {
         $workex = WorkExperience::find(Input::get('work_id'));
         $cv = Cv::select('id')->where('cv_code', Input::get('cv_code'))->first();
         if ($cv->id == $workex->cv_id) {
             $workex->title = Input::get('title');
             $workex->company = Input::get('company');
             $workex->location = Input::get('location');
             $workex->startdate = Input::get('startdate');
             $workex->enddate = Input::get('enddate');
             $workex->otherinfo = Input::get('otherinfo');
             $workex->save();
             $data["success"] = true;
             $data["message"] = 'Work Experience is succefully updated';
             $data["title"] = Input::get('title');
             $data["company"] = Input::get('company');
             $data["location"] = Input::get('location');
             $data["startdate"] = Input::get('startdate');
             $data["enddate"] = Input::get('enddate');
         } else {
             $data["message"] = 'Error in editing work';
         }
     } else {
         $data["success"] = false;
         $data["message"] = 'Please fill required fields';
     }
     return json_encode($data);
 }