public function findByRole($role) { return PersonType::where('role', $role)->first(); }
/** * Bootstrap any application services. * * @return void */ public function boot() { $selectActive = Collection::make(['' => 'Selecione', 1 => 'Sim', 0 => 'Não']); $personsTypeMenu = PersonType::where('is_visible', 1)->get(); view()->share(compact('selectActive', 'personsTypeMenu')); }