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); }
/** * 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); }