/** * Register the Alert Container instance */ protected function registerAlertContainer() { $this->app->bindShared('alert', function ($app) { $this->loadConfigurationOptions(); $alert = new Alert($this->getAlertHandler(), $this->getTheme()); if ($this->options['translate_texts']) { $alert->setLang($app['translator']); } return $alert; }); }
/** * Set the translator component (this is optional) * * @param \Illuminate\Translation\Translator $lang * @static */ public static function setLang($lang) { return \Styde\Html\Alert\Container::setLang($lang); }