/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $profile = !is_null($this->user) && $this->user->is_admin ? Profile::find($id) : Profile::visible()->find($id); return view('profiles.show', compact('profile')); }