/** * Constructor * @param mixed $messages * @param array $replacers */ public function __construct($messages = null, $replacers = array()) { $messages = is_null($messages) ? static::MESSAGE : $messages; parent::__construct($messages, $replacers, static::CODE); }
/** * Constructor * @param MessageBag|string|null $messages * @param array $replacers * @param number $code */ public function __construct($messages = null, $replacers = array(), $code = self::CODE) { $message = Lang::get($this->fetchMessage($messages)); $message = $this->replacePlaceholders($message, $replacers); parent::__construct($message, $code); }