Exemplo n.º 1
0
     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');
     $abilities = DB::table('abilities')->lists('ability', 'id');
     return View::make('cvbuilder.section_views.edit_language', ['lang' => $language, 'langs' => $langs, 'levels' => $levels, 'abilities' => $abilities]);
 });
 Route::post('/fetch_addsection', 'CVController@postSection');
 Route::post('/edit_section', 'CVController@putSection');
 Route::post('/edit_work', 'CVController@putwork');
 Route::post('/edit_education', 'CVController@puteducation');
 Route::post('/edit_nysc', 'CVController@putnysc');
Exemplo n.º 2
0
 public function putProfile()
 {
     $cre = ['profile_image' => Input::get('profile_image')];
     $rules = ['profile_image' => 'required'];
     $validator = Validator::make($cre, $rules);
     if ($validator->passes()) {
         $profiles = Nysc::find(input::get('profile_id'));
         $cv = CV::select('id')->where('cv_code', Input::get('cv_code'))->first();
         if ($cv->id == $profiles->cv_id) {
             $profiles->profile_image = Input::get('profile_image');
             $profiles->save();
             $data["message"] = 'Profile details are succefully updated';
             $data["profile_image"] = Input::get('profile_image');
         } else {
             $data["message"] = 'Error in editing image';
         }
         return json_encode($data);
     } else {
         return 'Please upload the image';
     }
 }