/** * Display a listing of the resource. * * @return Response */ public function IndexAction() { $this->title = Input::get('title'); $this->status = Input::get('status'); $this->album = Album::select('id', 'title', 'status')->where('title', 'like', '%' . $this->title . '%')->where('status', 'like', '%' . $this->status . '%')->paginate(5); return view('admin.album.album_list', ['album' => $this->album]); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function EditAction($id) { $this->gallery = Gallery::find($id); /* find album id*/ $this->album = Album::select('id', 'title')->orderBy('title', 'asc')->get(); if ($this->gallery) { return view('admin.gallery.gallery_edit', ['gallery' => $this->gallery, 'album' => $this->album]); } return redirect()->back()->with('message', Lang::get('response.CUSTOM_MESSAGE_ALERT', ['message' => 'Invalid Request'])); }