Пример #1
0
 public function __call($method, $parameters)
 {
     $morphed = $this->getOrganizationConfig('role.morphed');
     if (array_key_exists($method, $morphed)) {
         return $this->morphedByMany($morphed[$method], 'roleable');
     }
     return parent::__call($method, $parameters);
 }
Пример #2
0
 /**
  * This is a method that fetch the lists data
  * from repository method for drop down select
  * @param  string $provider
  * @param  string $columnValue
  * @param  string $columnKey
  * @return array
  */
 public function getLists($provider, $columnValue = 'name', $columnKey = 'id')
 {
     return OrganizationProvider::repo($provider)->showAll()->lists($columnValue, $columnKey);
 }