18 lines
406 B
PHP
18 lines
406 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Videos;
|
|
use Illuminate\Routing\Controller as BaseController;
|
|
|
|
class DanmakuQueryController extends BaseController
|
|
{
|
|
public function index()
|
|
{
|
|
$video_list = Videos::query()->withCount("danmakus")->orderByDesc("created_at")->limit(20)->get();
|
|
return view("danmaku", [
|
|
"video_list" => $video_list,
|
|
]);
|
|
}
|
|
}
|