/** * Changes the set SMS driver * * @param $driver */ public function driver($driver) { $this->container['sms.sender'] = $this->container->share(function ($app) use($driver) { return (new DriverManager($app))->driver($driver); }); $this->driver = $this->container['sms.sender']; }
/** * @param Closure $closure */ public function share(Closure $closure) { static::$container->share($closure); }