Example #1
0
 public function run()
 {
     $depts = Department::filterByDomain(1)->lists('name', 'id')->toArray();
     $prompt = [0 => 'Department'];
     $departments = $prompt + $depts;
     return view("widgets.select_department", ['departments' => $departments]);
 }
Example #2
0
 /**
  * Treat this method as a controller action.
  * Return view() or other content to display.
  */
 public function run()
 {
     return view("widgets.department_index", ['departments' => Department::filterByDomain($this->config['domain'])->get()]);
 }