Пример #1
0
 /**
  * Return a pictuners' pictunes and profile
  *
  * @param username
  * @return \Illuminate\Http\Response
  */
 public function user_pictunes($tld, $username)
 {
     // There's actually a username
     $userRequested = User::where(['username' => $username])->firstOrFail();
     $viewData['pictunes'] = json_encode($userRequested->pictunes()->get());
     return view('pictune.dashboard', $viewData);
 }
Пример #2
0
 /**
  * Show a users' profile and pictunes
  *
  * @param username
  * @return \Illuminate\Http\Response
  */
 public function user_pictunes($tld, $username)
 {
     $viewData['pictunes'] = json_encode(User::where(['username' => $username])->firstOrFail()->pictunesWithUserInfo($tld, $username)->get());
     return view('pictune.dashboard', $viewData);
 }