30 行
736 B
PHP
30 行
736 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Peertube\Videos;
|
||
|
use Illuminate\Support\Facades\DB;
|
||
|
use Illuminate\Http\Request;
|
||
|
use App\Http\Controllers\Peertube\Common;
|
||
|
// use Illuminate\Support\Facades\Log;
|
||
|
|
||
|
class Local extends Common {
|
||
|
private $common;
|
||
|
|
||
|
public function __construct () {
|
||
|
$this->common = new Common;
|
||
|
}
|
||
|
|
||
|
public function index () {
|
||
|
$res = [
|
||
|
'page' => 'videoslist',
|
||
|
'userinfo' => $this->common->user,
|
||
|
];
|
||
|
$res['video'] = $this->getVideo();
|
||
|
return view('pages.peertube.videos.local', ['res' => $res]);
|
||
|
}
|
||
|
|
||
|
function getVideo () {
|
||
|
$get = $this->ptapi_get('/api/v1/videos/?start=0&count=50&sort=-publishedAt&filter=local&skipCount=true&nsfw=both');
|
||
|
return $this->vidlist($get);
|
||
|
}
|
||
|
}
|