コード例 #1
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     if (!defined('SPARK_PATH')) {
         define('SPARK_PATH', base_path('support/packages/spark'));
     }
     if (!class_exists('Spark')) {
         class_alias('Laravel\\Spark\\Spark', 'Spark');
     }
     Spark::useUserModel('App\\Bridge\\Eloquent\\Model\\User');
     Spark::useTeamModel('App\\Bridge\\Eloquent\\Model\\Team');
     if ($this->app->runningInConsole()) {
         $this->commands([InstallCommand::class, UpdateCommand::class, UpdateViewsCommand::class, StorePerformanceIndicatorsCommand::class, VersionCommand::class]);
     }
     $this->registerServices();
 }
コード例 #2
0
 /**
  * To maintain Groid namespace on Spark Update
  */
 public function register()
 {
     Spark::useUserModel('Groid\\User');
     Spark::useTeamModel('Groid\\Team');
 }