コード例 #1
0
 public function findByRole($role)
 {
     return PersonType::where('role', $role)->first();
 }
コード例 #2
0
 /**
  * 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'));
 }