has($configPath)) { $function = config()->get($configPath); return call_user_func_array(array($this, $function[0]), $function[1]); } } return parent::__call($method, $params); } public function scopeCompany($query, $company_id) { $query->where('company_id', $company_id); return $query; } public function scopeScope($query) { $query->where($this->getTable() .'.company_id', '=', auth()->user()->company()->id); return $query; } }