40 lines
812 B
PHP
40 lines
812 B
PHP
<?php
|
|
namespace Modules\Profiler\Providers;
|
|
|
|
use App\Providers\ModuleServiceProvider;
|
|
use Modules\Profiler\Middleware\Profiler;
|
|
|
|
class ProfilerServiceProvider extends ModuleServiceProvider
|
|
{
|
|
protected function setModuleAlias()
|
|
{
|
|
$this->alias = 'profiler';
|
|
}
|
|
|
|
|
|
/**
|
|
* Boot the application events.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
parent::boot();
|
|
|
|
$this->app->register(ProfilerEventServiceProvider::class);
|
|
}
|
|
|
|
public function register()
|
|
{
|
|
parent::register();
|
|
|
|
$this->app['router']->prependMiddlewareToGroup('web', Profiler::class);
|
|
// $this->app['router']->prependMiddlewareToGroup('admin', Profiler::class);
|
|
}
|
|
|
|
|
|
protected function setModulePath()
|
|
{
|
|
$this->path = __DIR__;
|
|
}
|
|
} |