Example #1
0
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('user', function ($app) {
         return new User($app['http']);
     });
     $app->bind('user.group', function ($app) {
         return new Group($app['http']);
     });
 }
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('staff', function ($app) {
         return new Manager($app['http']);
     });
     $app->bind('staff.messagener', function ($app) {
         return new Messagener($app['http'], new Transformer());
     });
 }
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('cache', function ($app) {
         return new Manager($app);
     });
     // default adapter
     $app->bind('cache.adapter', function ($app) {
         return new FileAdapter();
     });
 }
 /**
  * Register service.
  *
  * @param Application $app
  *
  * @return mixed
  */
 public function register(Application $app)
 {
     $app->singleton('message', function ($app) {
         return new MessageFactory($app);
     });
     $messages = ['Text', 'Articles', 'Article', 'Image', 'Link', 'Location', 'Music', 'Transfer', 'ShortVideo', 'Video', 'Voice'];
     foreach ($messages as $message) {
         $app->bind('message.' . Str::snake($message), function ($app) use($message) {
             $class = __NAMESPACE__ . '\\' . $message;
             return new $class();
         }, false);
     }
 }
Example #5
0
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('url', function ($app) {
         return new Url($app['http']);
     });
 }
Example #6
0
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('store', function ($app) {
         return new Stats($app['http']);
     });
 }
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('semantic', function ($app) {
         return new Semantic($app->config['app_id'], $app['http']);
     });
 }
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('qrcode', function ($app) {
         return new QRCode($app['http']);
     });
 }
Example #9
0
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('js', function ($app) {
         return new Js($app['config']['app_id'], $app['config']['secret'], $app['cache'], $app['http']);
     });
 }
Example #10
0
 /**
  * Register Server.
  *
  * @param Application $app
  *
  * @return mixed|void
  */
 public function register(Application $app)
 {
     $app->bind('server', function ($app) {
         return new Guard($app['input'], $app['cryptor']);
     });
 }