diff --git a/app/Http/Controllers/CommentQueryController.php b/app/Http/Controllers/CommentQueryController.php index bbb9886..32ec65d 100644 --- a/app/Http/Controllers/CommentQueryController.php +++ b/app/Http/Controllers/CommentQueryController.php @@ -3,12 +3,13 @@ namespace App\Http\Controllers; use App\Models\VideoComments; +use Illuminate\Http\Request; use Illuminate\Routing\Controller as BaseController; class CommentQueryController extends BaseController { - public function index() { - $keyword = request()->get("keyword", ""); + public function index(Request $request) { + $keyword = $request->get("keyword", ""); $query = VideoComments::query()->where("is_top", "=", 1)->with("video")->orderByDesc("created_at"); if ($keyword) { $keyword_split = explode(" ", $keyword); diff --git a/app/Http/Controllers/ProgramQueryController.php b/app/Http/Controllers/ProgramQueryController.php index 8b46d1f..cb9f73c 100644 --- a/app/Http/Controllers/ProgramQueryController.php +++ b/app/Http/Controllers/ProgramQueryController.php @@ -3,12 +3,13 @@ namespace App\Http\Controllers; use App\Models\Programs; +use Illuminate\Http\Request; use Illuminate\Routing\Controller as BaseController; class ProgramQueryController extends BaseController { - public function index() { - $keyword = request()->get("keyword", ""); + public function index(Request $request) { + $keyword = $request->get("keyword", ""); $programs = Programs::query()->with(["appends", "video_pivots.video"])->limit(15)->orderByDesc("created_at")->get(); return view("program", [ "keyword" => $keyword,