public function edit($id) { $displays = $displayss = Display::all(); $categorys = $categoryss = Category::all(); $article = Article::find($id); return view('admin.articles.edit', ['article' => $article, "categorys" => $categorys, "categoryss" => $categoryss, "displays" => $displays, "displayss" => $displayss]); }
public function store(Request $request) { $request->parent_id = empty($request->parent_id) ? 1 : $request->parent_id; $messages = ['name.required' => '分类名不能为空']; $this->validate($request, ['name' => 'required'], $messages); Display::create(['name' => $request->name, 'parent_id' => $request->parent_id]); Session()->flash('status', 'display create was successful!'); return redirect('/admin/display'); }
public function edit($id) { $album = Album::find($id); $displays = $displayss = Display::all(); return view('admin.album.edit', ['album' => $album, "displays" => $displays, "displayss" => $displayss]); }
public function edit($id) { $video = Video::find($id); $displays = $displayss = Display::all(); return view('admin.video.edit', ['video' => $video, "displays" => $displays, "displayss" => $displayss]); }