diff --git a/app/Http/Controllers/Video/Game.php b/app/Http/Controllers/Video/Game.php index b0261cf..ba2b975 100644 --- a/app/Http/Controllers/Video/Game.php +++ b/app/Http/Controllers/Video/Game.php @@ -22,8 +22,9 @@ class Game { $res = DB::table('vid_game')->get(); if (!$res) return notfound($this->menu, $this->user, $res); $new = DB::table('vid_video')->orderBy('publish_date', 'desc')->limit(8)->get(); + $pop = DB::table('vid_video')->orderBy('view', 'desc')->orderBy('publish_date', 'desc')->limit(8)->get(); - return view('pages.site.video.game', ['res' => $res, 'new' => $new, 'menu' => $this->menu, 'user' => $this->user, 'err' => $this->err, 'suc' => $this->suc]); + return view('pages.site.video.game', ['res' => $res, 'new' => $new, 'pop' => $pop, 'menu' => $this->menu, 'user' => $this->user, 'err' => $this->err, 'suc' => $this->suc]); } public function add (Request $r) { diff --git a/resources/views/pages/site/video/game.blade.php b/resources/views/pages/site/video/game.blade.php index ee9a189..ea77ff1 100644 --- a/resources/views/pages/site/video/game.blade.php +++ b/resources/views/pages/site/video/game.blade.php @@ -9,6 +9,7 @@
@endif @include('pages.site.video.game.newest') + @include('pages.site.video.game.popularest') @include('pages.site.video.game.all') diff --git a/resources/views/pages/site/video/game/popularest.blade.php b/resources/views/pages/site/video/game/popularest.blade.php new file mode 100644 index 0000000..bee87fe --- /dev/null +++ b/resources/views/pages/site/video/game/popularest.blade.php @@ -0,0 +1,14 @@ +
+
+
人気な動画
+
+
+
+ @foreach ($pop as $p) +
+
{{ $p->title }}
+ +
{{ date('Y年m月d日 H:i:s', $p->publish_date) }}
+
+ @endforeach +
\ No newline at end of file