sarga/packages/Webkul/Sales/src/Providers/SalesServiceProvider.php

42 lines
1002 B
PHP
Raw Normal View History

2018-09-27 10:01:25 +00:00
<?php
namespace Webkul\Sales\Providers;
2020-01-23 12:11:47 +00:00
use Illuminate\Database\Eloquent\Factory as EloquentFactory;
2018-09-27 10:01:25 +00:00
use Illuminate\Support\ServiceProvider;
class SalesServiceProvider extends ServiceProvider
{
public function boot()
2018-09-27 10:01:25 +00:00
{
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
}
/**
* Register services.
*
* @return void
2020-01-23 12:11:47 +00:00
* @throws \Illuminate\Contracts\Container\BindingResolutionException
2018-09-27 10:01:25 +00:00
*/
public function register()
{
2020-01-23 12:11:47 +00:00
$this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories');
2019-08-22 15:24:30 +00:00
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/system.php', 'core'
);
2018-09-27 10:01:25 +00:00
}
2020-01-23 12:11:47 +00:00
/**
* Register factories.
*
* @param string $path
*
* @return void
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
protected function registerEloquentFactoriesFrom($path): void
{
$this->app->make(EloquentFactory::class)->load($path);
}
2018-09-27 10:01:25 +00:00
}