class ProfileController extends Controller
{
public function showProfile()
{
self::checkUserAuth();
}
private function checkUserAuth()
{
if (Auth::check())
{
return view('profile.index');
}
else
{
return redirect('/');
}
}
}
}