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

getPage() public method

Return all tweets to the Twitter API dashboard
public getPage ( ) : mixed
return mixed
    public function getPage()
    {
        if (Session::get('provider') !== 'twitter') {
            Auth::logout();
            Session::flush();
            return redirect('/auth/twitter');
        }
        $searchedTweets = json_decode($this->searchForTweets($this->searchItem), true);
        return view('api.twitter')->withTweets($searchedTweets['statuses']);
    }