调整视频详情页

This commit is contained in:
2021-11-29 16:05:46 +08:00
parent 044a3c560a
commit 6849e908c7
7 changed files with 175 additions and 87 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers;
use App\Models\Video;
class VideoController extends Controller
{
/**
* Notes: description
*
* @Author: 玄尘
* @Date : 2021/10/8 14:54
* @param \App\Models\Video $video
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function show(Video $video)
{
$parent = $category = $video->category;
if ($category->childrens->isEmpty() && $category->parent) {
$parent = $category->parent;
}
return view('video.show', compact('video', 'parent', 'category'));
}
}