␊ |
␉␉$skills = array();␊ |
␊ |
␉␉if (Input::get('java') === 'Java'){}␊ |
␉␉if (Input::get('java') === 'Java')␊ |
␉␉{␊ |
␉␉array_push($skills, 'Java');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('php') === 'PHP') {}␊ |
␉␉if (Input::get('php') === 'PHP') ␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'PHP');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('python') === 'Python') {} ␊ |
␉␉if (Input::get('python') === 'Python')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'Python');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('cplus') === 'Cplus') {}␊ |
␉␉if (Input::get('cplus') === 'Cplus')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'C++');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('objc') === 'Objc') {}␊ |
␉␉if (Input::get('objc') === 'Objc')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'Objective C');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('htmljscss') === 'Html') {}␊ |
␉␉if (Input::get('htmljscss') === 'Html')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'HTML JS CSS');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('android') === 'Android') {}␊ |
␉␉array_push($skills, 'Android');␊ |
␊ |
␉␉if (Input::get('ux') === 'UXDesign') {}␊ |
␉␉if (Input::get('android') === 'Android') ␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'Android');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('ux') === 'UXDesign')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'Java');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('webapps') === 'Webapps') {}␊ |
␉␉if (Input::get('webapps') === 'Webapps')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'Web Apps');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('ruby') === 'Ruby') {}␊ |
␉␉if (Input::get('ruby') === 'Ruby') ␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'Ruby on Rails');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('people') === 'People') {}␊ |
␉␉if (Input::get('csharp') === 'CSharp')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'C#');␊ |
␉␉}␊ |
␊ |
␉␉if (Input::get('people') === 'People')␊ |
␉␉{␊ |
␉␉␉array_push($skills, 'People Skills');␊ |
␉␉}␊ |
␊ |
␉␉$skills = serialize($skills);␊ |
␊ |
|
␉␉$user->bio = \Input::get('bio');␊ |
␉␉$user->skills = $skills;␊ |
␊ |
␉␉if (\Input::hasFile('photo')) {␊ |
␉␉if (\Input::hasFile('photo')) ␊ |
␉␉{␊ |
␉␉␉$photo = \Input::file('photo');␊ |
␉␉␉$filename = uniqid('profile_').'.'.$photo->getClientOriginalExtension();␊ |
␉␉␉$photo->move(public_path('images/users'), $filename);␊ |
␉␉␉$user->photo = 'images/users/'.$filename;␊ |
␉␉}␊ |
␊ |
␉␉$role = UserXrefRole::create(array(␊ |
␉␉␉'user_id' => $user_id,␊ |
␉␉␉'role_id' => $group_id␊ |
␉␉));␊ |
␉␉$user_role = UserXrefRole::where('user_id', '=', $user_id)->get();␊ |
␊ |
␉␉if(count($user_role))␊ |
␉␉{␊ |
␉␉␉$user_role->user_id = $user_id;␊ |
␉␉␉$user_role->role_id = $group_id;␊ |
␉␉}else␊ |
␉␉{␊ |
␉␉␉$user_role = UserXrefRole::create(array(␊ |
␉␉␉␉'user_id' => $user_id,␊ |
␉␉␉␉'role_id' => $group_id␊ |
␉␉␉));␊ |
␉␉␉␊ |
␉␉}␊ |
␊ |
␉␉$role->save();␊ |
␉␉$user_role->save();␊ |
␊ |
␉␉if ($user->save()) ␊ |
␉␉{␊ |
␉␉␉return Redirect::route('users', array('user_id' => $user_id));␊ |
␉␉␉return Redirect::route('users', array($user_id));␊ |
␉␉}else␊ |
␉␉{␊ |
␉␉␉\Redirect::back('complete', array($user_id, $group_id ));␊ |