コード例 #1
0
 /**
  * Registers the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton('services', function (Application $app) {
         $path = config('services.gate.credentials');
         if (strlen($path) > 0 && $app->make('filesystem')->has($path)) {
             return Services::loadFromJson($path);
         }
         return new Services();
     });
 }
コード例 #2
0
 public function setUp()
 {
     parent::setUp();
     $this->services = Services::loadFromJson('credentials.json');
 }