示例#1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($user_id)
 {
     if (Auth::check()) {
         $user = Auth::user();
         $data = Profiles::where(compact('user_id'))->first();
         return view('show.profile', compact('data', 'user'));
     }
 }
示例#2
0
 public function getCreateProfile()
 {
     $user_id = Auth::user()->id;
     $profile = Profiles::where('user_id', '=', $user_id)->first();
     if (!$profile) {
         return view('auth.create_profile');
     } else {
         return Redirect::to('/auth/changeprofile');
     }
 }