動画の事
このコミットが含まれているのは:
コミット
a7ab28e96a
|
@ -21,6 +21,7 @@ class Prayer {
|
|||
$game = DB::table('vid_game')->where('id', $res->game_id)->first();
|
||||
if (!$game) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
|
||||
$res->publish_date = date('Y月m月d日', $res->publish_date);
|
||||
$res->gametitle = explode('】', $res->title);
|
||||
$res->title = $res->gametitle[1];
|
||||
$res->gametitle = $res->gametitle[0];
|
||||
|
|
|
@ -17,10 +17,11 @@ class VideoTable {
|
|||
public function index ($slug) {
|
||||
$slg = DB::table('vid_game')->select('id', 'name')->where('slug', $slug)->first();
|
||||
if (!$slg) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
$res = DB::table('vid_video')->where('game_id', $slg->id)->orderBy('id', 'desc')->get();
|
||||
$res = DB::table('vid_video')->where('game_id', $slg->id)->orderBy('publish_date', 'desc')->get();
|
||||
if (!$res) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
|
||||
foreach ($res as $r) {
|
||||
$r->publish_date = date('Y月m月d日', $r->publish_date);
|
||||
$r->gametitle = explode('】', $r->title);
|
||||
$r->title = (isset($r->gametitle[1]) ? $r->gametitle[1] : '');
|
||||
$r->gametitle = $r->gametitle[0];
|
||||
|
@ -46,6 +47,8 @@ class VideoTable {
|
|||
$frm['title'] = $r->title;
|
||||
$frm['vid'] = $r->vid;
|
||||
$frm['game_id'] = $r->game_id;
|
||||
$frm['thumbnail'] = $r->thumbnail;
|
||||
$frm['publish_date'] = time();
|
||||
$frm['url'] = ($r->url ?: '');
|
||||
$frm['youtube'] = ($r->youtube ?: '');
|
||||
$frm['twitter'] = ($r->twitter ?: '');
|
||||
|
@ -113,6 +116,7 @@ class VideoTable {
|
|||
$frm->title = $r->title;
|
||||
$frm->vid = $r->vid;
|
||||
$frm->game_id = $r->game_id;
|
||||
$frm->thumbnail = $r->thumbnail;
|
||||
$frm->url = ($r->url ?: '');
|
||||
$frm->youtube = ($r->youtube ?: '');
|
||||
$frm->twitter = ($r->twitter ?: '');
|
||||
|
|
|
@ -56,7 +56,7 @@ function userDetail ($id, $kero=null) {
|
|||
}
|
||||
}
|
||||
|
||||
$p3->avatar = ($p3->avatar ? '/'.$p3->avatar : '/img/noicon.webp');
|
||||
$p3->avatar = ($p3->avatar ? '/'.$p3->avatar : '/img/noicon.jpg');
|
||||
return array('user_id' => $user_id, 'showname' => $showname, 'showcol' => $showcol, 'avatar' => $p3->avatar);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
@section('content')
|
||||
<div class="within">
|
||||
<div class="bar">【<a href="/video/{{ $res->slug }}">{{ $res->mgametitle }}</a>{{ $res->gametitle }}】{{ $res->title }}</div>
|
||||
<div class="meta" style="text-align: right;">{{ $res->publish_date }}で公開</div>
|
||||
<div class="back">
|
||||
<video style="max-width: 813px; width: 100%; height: 458px;" src="{{ $res->url }}" controls></video>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,12 @@
|
|||
@foreach ($res as $k => $r)
|
||||
<tr>
|
||||
<td scope="row">{{ $r->gametitle }}</td>
|
||||
<td scope="row">{{ $r->title }}</td>
|
||||
<td scope="row">
|
||||
<div class="row">
|
||||
@if ($r->thumbnail) <div class="col-2"><img src="{{ $r->thumbnail }}" alt="{{ $r->title }}のサムネ" style="width: 70px;" /></div> @endif
|
||||
<div class="col">{{ $r->title }}<br /><span style="font-size: 8px;">公開日:{{ $r->publish_date }}</span></div>
|
||||
</div>
|
||||
</td>
|
||||
<td scope="row">@if ($r->url) <a href="/video/play/{{ $r->vid }}"><img src="/img/play-box.png" class="logo-play" alt="【{{ $r->gametitle }}】{{ $r->title }}"></a> @endif</td>
|
||||
<td scope="row">@if ($r->youtube) <a href="{{ $r->youtube }}"><img src="/img/play-box.png" class="logo-play" alt="【{{ $r->gametitle }}】{{ $r->title }}"></a> @endif</td>
|
||||
<td scope="row">@if ($r->twitter) <a href="{{ $r->twitter }}"><img src="/img/play-box.png" class="logo-play" alt="【{{ $r->gametitle }}】{{ $r->title }}"></a> @endif</td>
|
||||
|
|
新しいイシューから参照