common = new Common; } public function index () { $res = [ 'page' => 'videoslist', 'userinfo' => $this->common->user, ]; $res['video'] = $this->getVideo(); return view('pages.peertube.videos.recentlyadded', ['res' => $res]); } function getVideo () { $get = $this->ptapi_get('/api/v1/videos/?start=0&count=25&sort=-publishedAt&skipCount=true&nsfw=both'); return $this->vidlist($get); } }