mirror of
https://gh.wpcy.net/https://github.com/nielspeen/freescout-redis-driver.git
synced 2026-05-28 04:41:59 +08:00
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\RedisDriver\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Modules\RedisDriver\Services\RedisOverrideService;
|
|
|
|
class RedisDriverServiceProvider extends ServiceProvider
|
|
{
|
|
private const MODULE_NAME = 'redisdriver';
|
|
|
|
public function register(): void
|
|
{
|
|
$this->app->booting(function () {
|
|
RedisOverrideService::override();
|
|
});
|
|
}
|
|
|
|
public function boot()
|
|
{
|
|
$this->loadViewsFrom(__DIR__ . '/../Resources/views', self::MODULE_NAME);
|
|
$this->hooks();
|
|
}
|
|
|
|
public function registerViews()
|
|
{
|
|
$viewPath = resource_path('views/modules/redisdriver');
|
|
|
|
$sourcePath = __DIR__ . '/../Resources/views';
|
|
|
|
$this->publishes([
|
|
$sourcePath => $viewPath
|
|
], 'views');
|
|
|
|
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
|
return $path . '/modules/redisdriver';
|
|
}, \Config::get('view.paths')), [$sourcePath]), 'redisdriver');
|
|
}
|
|
|
|
/**
|
|
* Module hooks.
|
|
*/
|
|
public function hooks()
|
|
{
|
|
}
|
|
}
|