35 lines
1005 B
PHP
35 lines
1005 B
PHP
<?php
|
|
namespace App\Domains\Company\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Domains\Company\Providers\RouteServiceProvider;
|
|
use Illuminate\Database\Eloquent\Factory as EloquentFactory;
|
|
|
|
class CompanyServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* 引导启动任何应用程序服务
|
|
*
|
|
* php artisan make:migration --path=app/Domains/Company/Database/migrations
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
// $this->loadMigrationsFrom([realpath(__DIR__ . '/../Database/migrations')]);
|
|
// $this->app->make(EloquentFactory::class)->load(realpath(__DIR__ . '/../Database/factories'));
|
|
// $this->mergeConfigFrom(realpath(__DIR__ . '/../config.php'), 'domain.company');
|
|
}
|
|
|
|
/**
|
|
* 注册一个服务提供者
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->register(RouteServiceProvider::class);
|
|
$this->app->register(MiddlewareServiceProvider::class);
|
|
}
|
|
}
|