Beispiel #1
0
 public function processSwitch()
 {
     $module = \Neyko\Admin\Model\AdminModule::where("name", "=", \Input::get("module"))->first();
     $model = $module->model;
     $row = $model::find(\Input::get("id"));
     $field = \Input::get("field");
     $row->{$field} = \Input::get("value");
     $row->save();
     return json_encode(array("success" => "true"));
 }
Beispiel #2
0
 public function isParentOf($module)
 {
     return AdminModule::where("name", "=", $module)->where("parent", "=", $this->id)->count();
 }