public function editGallery($id_gallery) { $gallery = m_gallery::find($id_gallery); $page_title = "Edit Gallery"; $title = "Admin - Edit Gallery"; $button_name = "Update Gallery"; $url = 'gallery/updateGallery'; $status = m_status::wherein('code', $this->code)->lists('desc', 'code'); return view('backend.formgallery', ['title' => $title, 'page_title' => $page_title, 'button_name' => $button_name, 'url' => $url, 'gallery' => $gallery, 'status' => $status]); }
public function editCat($catid) { $cat = m_cat::find($catid); $page_title = "Edit Category"; $title = "Admin - Edit Category ID " . $catid; $button_name = "Update Category"; $url = 'cat/updateCat'; //$status = m_status::lists('desc','code'); $status = m_status::wherein('code', $this->code)->lists('desc', 'code'); $myclass = new myclass(); $cb_parent = $myclass->gen_cat(); return view('backend.formcat', ['title' => $title, 'page_title' => $page_title, 'button_name' => $button_name, 'url' => $url, 'status' => $status, 'cb_parent' => $cb_parent, 'cat' => $cat]); }
public function updateStatus(Request $request) { $code = Input::get('txt_code'); $validator = Validator::make($request->all(), $this->rules_updated); $validator->setAttributeNames($this->niceNames); if ($validator->fails()) { return redirect('status/editStatus/' . $code)->withErrors($validator)->withInput(); } $status = m_status::find($code); $status->desc = Input::get('txt_desc'); $status->color = Input::get('txt_color'); $status->chby = Session::get('usrid'); if ($status->save()) { return Redirect::to('status/listStatus')->with('success', 'Status was updated successfully!'); } }
public function editUser($usrid) { //$users = m_user::GetByUserID($usrid)->first(); $users = m_user::find($usrid); $page_title = "Add User"; $title = "Admin - Edit User " . $usrid; $button_name = "Update User"; $url = 'user/updateUser'; $usergrp = m_user_grp::lists('grp_desc', 'id_grp'); $status = m_status::lists('desc', 'code'); return view('backend.formuser', ['title' => $title, 'page_title' => $page_title, 'button_name' => $button_name, 'users' => $users, 'url' => $url, 'usergrp' => $usergrp, 'status' => $status]); }
public function editArt($artid) { $art = m_art::find($artid); $page_title = "Edit Article"; $title = "Admin - Edit Article "; $button_name = "Update Article"; $url = 'art/updateArt'; $status = m_status::lists('desc', 'code'); $myclass = new myclass(); $cb_cat = $myclass->gen_cat(); return view('backend.formart', ['title' => $title, 'page_title' => $page_title, 'button_name' => $button_name, 'url' => $url, 'status' => $status, 'cb_cat' => $cb_cat, 'art' => $art]); }