public function instagramLogin() { $instagram = new Instagram(); if (Input::has('code')) { $instagram->storeSession(); $user = $instagram->getUser(); return $user; } else { return $instagram->getRedirectURL(); } }