App\Http\Controllers\LinkedInController::getPage PHP Method

getPage() public method

Return all data to the LinkedIn API dashboard
public getPage ( ) : mixed
return mixed
    public function getPage()
    {
        if (Session::get('provider') !== 'linkedin') {
            Auth::logout();
            Session::flush();
            return redirect('/auth/linkedin');
        }
        $this->setRequestOptions();
        $relativeUrl = '/people/~:(firstName,lastName,emailAddress,pictureUrl,location,industry,numConnections,numConnectionsCapped,summary,publicProfileUrl)?format=json';
        $this->setGetResponse($relativeUrl);
        $userDetails = $this->getData();
        return view('api.linkedin')->withDetails($userDetails);
    }