app, 'bindShared') ) { $this->app->bindShared('searchy', $closure); } // Laravel 5.2 Goodness :) else { $this->app->singleton('searchy', $closure); } } /** * Loads the configuration file. */ public function setupConfig() { $source = realpath(__DIR__.'/../config/searchy.php'); if (class_exists('Illuminate\Foundation\Application', false)) { $this->publishes([$source => config_path('searchy.php')]); } $this->mergeConfigFrom($source, 'searchy'); } /** * Boot the service provider. */ public function boot() { $this->setupConfig(); $this->registerSearchy(); } }