コード例 #1
0
 /**
  * Show the form for creating a user profile.
  *
  * @return $this
  */
 public function edit()
 {
     $describes = Skill::orderBy('name')->lists('name', 'id')->all();
     // We want other to be at the bottom
     $other = array_search('Other', $describes);
     unset($describes[$other]);
     $describes[$other] = 'Other';
     $skills = Tag::orderBy('name')->lists('name', 'id')->all();
     $professions = Profession::orderBy('name')->lists('name', 'id')->all();
     $professions[] = 'Other';
     return view('profile.edit')->with('user', Auth::user())->with('describes', $describes)->with('skills', $skills)->with('route', Route::currentRouteName())->with('professions', $professions);
 }