/**
  * Register the service provider.
  */
 public function register()
 {
     App::bind('toolbox.commands.controllers', function () {
         return new \Impleri\Toolbox\Commands\ControllersCommand();
     });
     App::bind('toolbox.commands.models', function () {
         return new \Impleri\Toolbox\Commands\ModelsCommand();
     });
     App::bind('toolbox.commands.routes', function () {
         return new \Impleri\Toolbox\Commands\RoutesCommand();
     });
     App::bind('toolbox.commands.schema', function () {
         return new \Impleri\Toolbox\Commands\SchemaCommand();
     });
     App::bind('toolbox.commands.views', function () {
         return new \Impleri\Toolbox\Commands\ViewsCommand();
     });
     App::bind('toolbox.commands.build', function () {
         return new \Impleri\Toolbox\Commands\BuildCommand();
     });
     $this->commands($this->provides());
     // Subscribe our own commands to toolbox.compile
     Event::listen('toolbox.build', function ($app) {
         $app->call('toolbox:routes');
         $app->call('toolbox:controllers');
         $app->call('toolbox:models');
         $app->call('toolbox:schema');
         $app->call('toolbox:views');
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->app->register('Intervention\\Image\\ImageServiceProvider');
     App::bind('Uploader', function ($app) {
         return new Uploader($app['request']);
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->mergeConfigFrom(__DIR__ . '/../../config/smsc.php', 'smsc');
     App::bind('smsc', function () {
         return new Smsc();
     });
 }
 /**
  * Register any package services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('VKAPI', function () {
         return new VKAPIClass(config('VKAPI.access_token'), config('VKAPI.version'), config('VKAPI.api_url'));
     });
     $this->publishes([__DIR__ . '/../config/VKAPI.php' => config_path('VKAPI.php')]);
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->mergeConfigFrom(__DIR__ . '/../../config/yandexpdd.php', 'yandexpdd');
     App::bind('yandexpdd', function () {
         return new YandexPdd();
     });
 }
 public function boot()
 {
     $this->package('mrosati84/laradmin');
     $prefix = Config::get('laradmin::prefix');
     $namespace = Config::get('laradmin::namespace');
     $entities = Config::get('laradmin::entities');
     foreach ($entities as $entity => $properties) {
         $fullClassName = $namespace . '\\' . $entity . 'Admin';
         $baseAdminController = 'Mrosati84\\Laradmin\\BaseAdminController';
         // register admin classes bindings
         App::bind($fullClassName, function () use($fullClassName, $entity) {
             return new $fullClassName($entity);
         });
         // register custom filters classes
         App::bind('AuthenticationFilter', 'Mrosati84\\Laradmin\\Filters\\AuthenticationFilter');
         // register custom route filters
         Route::filter('laradmin.auth', 'AuthenticationFilter');
         // register laradmin index route (just a redirect to default entity)
         Route::get($prefix, array('as' => 'laradmin.index', function () use($prefix) {
             return Redirect::route($prefix . '.' . strtolower(Config::get('laradmin::defaultEntity')) . '.index');
         }));
         // register entities routes
         Route::group(array('prefix' => $prefix, 'before' => 'laradmin.auth'), function () use($entity, $fullClassName) {
             Route::resource(strtolower($entity), $fullClassName);
         });
     }
 }
 /**
  * Register any package services.
  *
  * @return void
  */
 public function register()
 {
     $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'l5-sugarcrm');
     App::bind('sugarcrm', function () {
         return new SugarAPI();
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('zendesk', function () {
         return new \Zendesk\Resource\Zendesk();
     });
     $this->mergeConfigFrom(__DIR__ . '/../config.php', 'zendesk-config');
 }
 /**
  * Register any package services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('citizen', function () {
         return new Citizen();
     });
     // use this if your package has a config file
     config(['config/erepapi.php']);
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->handleConfig();
     $this->registerEvents();
     $this->registerCommands();
     App::bind('slug', function ($app, $parameters) {
         return new \AlexeyMezenin\LaravelRussianSlugs\Slugs($parameters);
     });
 }
 /**
  * Register any other events for your application.
  *
  * @param  \Illuminate\Contracts\Events\Dispatcher $events
  * @return void
  */
 public function boot(DispatcherContract $events)
 {
     parent::boot($events);
     Log::info("Booting Datatext service");
     $this->publishes([__DIR__ . '/../database/migrations/' => database_path('migrations')], 'migrations');
     App::bind("datatext.user_provider", '\\Jvelo\\Datatext\\LaravelUserProvider');
     App::bind("datatext.assets_manager", '\\Jvelo\\Datatext\\Assets\\DefaultAssets');
     App::bind("datatext.shortcodes", '\\Jvelo\\Datatext\\Shortcodes\\Shortcodes');
     App::bind("datatext.api.pages", '\\Jvelo\\Datatext\\Api\\Pages');
 }
Beispiel #12
0
 /**
  * Registers the current Model and the current Controllers to the IoC.
  * Required for theirs facades
  */
 public function registerModuleFacades()
 {
     $className = ucfirst($this->module);
     App::bind('platform.core.module.model', function () use($className) {
         $modelName = 'Spescina\\PlatformCore\\Models\\' . $className;
         return new $modelName();
     });
     App::singleton('platform.core.module.controller', function () use($className) {
         $controllerName = 'Spescina\\PlatformCore\\Controllers\\' . $className . 'Controller';
         return new $controllerName();
     });
 }
 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     $this->publishes([__DIR__ . '/migrations/' => database_path('/migrations')], 'migrations');
     $this->publishes([__DIR__ . '/config/mercadopago.php' => config_path('mercadopago.php')], 'config');
     $this->loadViewsFrom(__DIR__ . '/Views', 'MercadoPago');
     App::bind('mercadopago', function () {
         return new Mercadopago(config('services.mercadopago.CLIENT_ID'), config('services.mercadopago.CLIENT_SECRET'), config('services.mercadopago.SANDBOXMODE'));
     });
     //$routeConfig = [
     //    'namespace' => 'jorgelsaud\MercadoPago\Controllers',
     //    'prefix' => $this->app['config']->get('debugbar.route_prefix'),
     //];
     include __DIR__ . '/routes/routes.php';
 }
 public function boot()
 {
     App::register(\MatthC\Privileges\PrivilegesServiceProvider::class);
     App::register(\HieuLe\Active\ActiveServiceProvider::class);
     App::bind('Active', function () {
         return new \HieuLe\Active\Facades\Active();
     });
     $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'laradmin');
     $this->publishes([__DIR__ . '/../config/laradmin.php' => config_path('laradmin.php')]);
     $this->publishes([__DIR__ . '/../../public' => public_path('vendor/laradmin')], 'public');
     if (!$this->app->routesAreCached()) {
         require __DIR__ . '/../routes.php';
     }
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     // Register Package
     $this->package('j42/laravel-firebase', null, __DIR__ . '/../../../');
     // Get pseudo-connection from config
     $config = Config::get('database.connections.firebase');
     // Dependency Injection: Main Service
     App::singleton('firebase', function ($app) use($config) {
         return new Client($config);
     });
     // Dependency Injection: Token Provider
     App::bind('firebase.token', function ($app) use($config) {
         return new Token($config['token']);
     });
 }
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->package('selmonal/imagemanager');
     $path = realpath(__DIR__ . "/../../views");
     // naming views
     View::addNamespace('SIM', $path);
     App::bind('Selmonal\\Imagemanager\\ImageRepositoryInterface', 'Selmonal\\Imagemanager\\EloquentImageRepository');
     // Intervention image manipulator
     App::register("Intervention\\Image\\ImageServiceProvider");
     $this->app->bind("Selmonal\\Imagemanager\\ImageManipulator", function () {
         $basePath = public_path() . Config::get("imagemanager::basePath");
         $sizes = Config::get("imagemanager::sizes");
         return new \Selmonal\Imagemanager\ImageManipulator($basePath, $sizes);
     });
 }
 /**
  * Test that the service provider can register an instance of fixture
  * with the application container.
  * 
  * @test
  * @return void
  */
 public function it_should_be_able_to_register_an_instance_of_fixture_with_the_container()
 {
     App::bind('db', function ($app) {
         $mockedDB = m::mock('Illuminate\\Database\\DatabaseManager');
         $mockedConnection = m::mock('Illuminate\\Database\\Connection');
         $pdo = new PDO('sqlite::memory:');
         $mockedDB->shouldReceive('connection')->once()->andReturn($mockedConnection);
         $mockedConnection->shouldReceive('getPdo')->once()->andReturn($pdo);
         return $mockedDB;
     });
     App::bind('Str', function ($app) {
         return m::mock('Illuminate\\Support\\Str');
     });
     App::bind('config', function ($app) {
         $mockedConfig = m::Mock('Illuminate\\Config\\Repository');
         $mockedConfig->shouldReceive('get')->once()->with('fixture-l4::config');
         return $mockedConfig;
     });
     $instance = Fixture::getFacadeRoot();
     $this->assertInstanceOf('Codesleeve\\Fixture\\Fixture', $instance);
 }
Beispiel #18
0
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     // modal helper
     App::bind('Modal', function () {
         return new ModalHelper();
     });
     // image manager helper
     App::bind('ImageManager', function () {
         return new ImageManagerHelper();
     });
     // file manager helper
     App::bind('FileManager', function () {
         return new FileManagerHelper();
     });
     // console helper
     App::bind('Console', function () {
         return new ConsoleHelper();
     });
     // permission helper
     App::bind('Permission', function () {
         return new PermissionHelper();
     });
     // validation helper
     App::bind('Validation', function () {
         return new ValidationHelper();
     });
     // table list helper
     App::bind('TableList', function () {
         return new TableListHelper();
     });
     // custom log helper
     App::bind('CustomLog', function () {
         return new CustomLogHelper();
     });
     // env helper
     App::bind('Env', function () {
         return new EnvHelper();
     });
 }
 /**
  * @param $e
  * @throws
  */
 public function handleNotFoundException($e)
 {
     Flash::error(trans('elegant::elegant.error.not found'));
     App::bind('Illuminate\\Contracts\\Debug\\ExceptionHandler', ModelNotFoundHandler::class);
     throw $e;
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('Rome2RioData', function () {
         return new \Rome2RioData();
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('Foo', function () {
         return new Foo();
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('guzzlerequest', function () {
         return new Guzzle();
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('oauthclient', function () {
         return new GenericProvider(['clientId' => '1_2jxb8np5n8o4ss0c4wg8csc4sk0oo8gs88s8coc4kgocg44gks', 'clientSecret' => '52gwqoirmm4gs08cscw0wkowwkc8swk4wg0s0wws8gc0w048sc', 'redirectUri' => '', 'urlAuthorize' => '', 'urlAccessToken' => 'localhost/SerbinarioCrudRestApi/web/app_dev.php/oauth/v2/token', 'urlResourceOwnerDetails' => '']);
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('voice', function () {
         return new \myocuhub\Services\Twilio\TwilioVoice();
     });
 }
 /**
  * Register bindings in the container.
  *
  * @return void
  */
 public function register()
 {
     App::bind('product', function () {
         //return new Bem();
     });
 }
 /**
  * {@inheritDoc}
  */
 public function register()
 {
     App::bind('Larrytech\\Auth\\Repositories\\RoleRepositoryInterface', 'Larrytech\\Auth\\Repositories\\DbRoleRepository');
     App::bind('Larrytech\\Auth\\Repositories\\UserRepositoryInterface', 'Larrytech\\Auth\\Repositories\\DbUserRepository');
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('Semantics', function () {
         return new \App\Classes\Semantics();
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('selectField', function () {
         return new SelectFieldBuilder();
     });
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     App::bind('rajaOngkir', function () {
         return new RajaOngkir();
     });
 }
 /**
  * @param string $locale
  */
 public function create(string $locale)
 {
     App::bind(DateFormatPresenterInterface::class, 'MyBlog\\Presenters\\DateFormatPresenter_' . $locale);
 }