/** * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function getIndex() { $this->authorize('module_forms_manage_forms'); view()->share(['forms' => Form::with('fields')->where('site_id', $this->site->id)->get(), 'pages' => Page::where(['site_id' => $this->site->id])->get(), 'users' => User::all()]); $tabs = ['active' => 'forms', 'content' => view('moduleforms::backend.forms')]; $data['content'] = view('moduleforms::backend.index', $tabs); return view($this->layout, $data); }
public function getIndex() { view()->share(['gerentes' => Gerente::all(), 'users' => User::all()]); $data['content'] = view('moduleforms::backend.index'); return view($this->layout, $data); }