public function edit(Post $post = null) { $topics = Topic::get(); return view('posts.edit', compact('post', 'topics')); }
/** * Show the form for creating a new resource. * * @return Response */ public function create() { $topics = Video::distinct()->get(['topic', 'class']); $units = Topic::get(); return view('videos.create', compact('topics', 'units')); }