public function postAdd() { $inputs = $this->request->all(); Category::create($inputs); $cats = Category::all(); $theme = "Admin"; $ddl_cats = array(); $ddl_cats[0] = 'انتخاب کنید'; foreach ($cats as $cat) { $ddl_cats[$cat->id] = $cat->title; } return $this->theme->baseDashboard("Post::CatAdd", compact("ddl_cats", "cats", "theme")); }
public function getShowPost($permalink = "") { if (!$permalink) { exit('Not found.'); } $post = $this->db->table('cms.cms_posts', ['permalink', $permalink])->first(); if (!$post) { exit('404 not found'); } return $this->theme->baseDashboard("Front::view.single", ['post' => $post]); }
public function getUpdate(Post $ad) { return $this->theme->baseDashboard('Post::ad.AdUpdate')->with(compact('ad')); }
public function index() { $themeWidgets = $this->widgets->getWidgets(); $sidebars = $this->sidebar->getHook()->getAreas(); return $this->theme->baseDashboard("Widget::index", compact('sidebars', 'themeWidgets')); }
public function index() { return $this->theme->baseDashboard("Setting::index"); }
public function getList() { $sliders = Slider::all(); return $this->theme->baseDashboard("Sliders::SliderList", compact('sliders')); }
public function register() { return $this->theme->baseDashboard("Admin::register"); }
public function index() { $permissions = PermissionModel::all(); return $this->theme->baseDashboard("UserManagement::permission.index", ["permissions" => $permissions]); }
public function getList() { $pages = Post::where('type', PostType::page)->get(); return $this->theme->baseDashboard("Post::PageList")->with('pages', $pages); }
public function getList() { $mainMenus = MainMenu::all(); return $this->theme->baseDashboard("Menu::MainMenuList", compact('mainMenus')); }
public function getCreate() { return $this->theme->baseDashboard("Menu::create", ['areas' => $this->hooks->getHook()->getAreas()]); }