/** * Pass view binding methods to the ViewBinder instance * * @param string $methodName The called method name * @param array $arguments The called method arguments * * @return mixed The return value from the ViewBinder method * * @throws \BadMethodCallException If the method does not exist in the * ViewBinder instance */ public function __call($methodName, $arguments) { $method = DynamicMethod::load($methodName); if ($method->existsOn($this->viewBinder)) { return $method->callOn($this->viewBinder, $arguments); } return parent::__call($methodName, $arguments); }