/** * Handle dynamic method calls to the relationship. * * @param string $method * @param array $parameters * * @return mixed */ public function __call($method, $parameters) { $result = parent::__call($method, $parameters); if ($method !== 'get') { call_user_func_array([$this->fallbackQuery, $method], $parameters); } return $result; }
/** * Handle dynamic method calls to the relationship. * * @param string $method * @param array $parameters * @return mixed */ public function __call($method, $parameters) { try { return parent::__call($method, $parameters); } catch (BadMethodCallException $e) { $this->macroBuffer[] = compact('method', 'parameters'); return $this; } }