freescout-restricted-customers/src/FreescoutRestrictedCustomersServiceProvider.php

35 lines
853 B
PHP
Raw Normal View History

2024-07-03 11:45:15 +00:00
<?php
/*
SPDX-License-Identifier: AGPL
SPDX-FileCopyrightText: © 2024 Millions Missing FRANCE <info@millionsmissing.fr>
*/
namespace MMF\FreescoutRestrictedCustomers;
use Illuminate\Support\Facades\Route;
2024-07-03 11:45:15 +00:00
use Illuminate\Support\ServiceProvider;
class FreescoutRestrictedCustomersServiceProvider extends ServiceProvider {
public function register() {
//
}
public function boot() {
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
$this->registerRoutes();
$this->loadViewsFrom(__DIR__.'/../resources/views', 'freescout-restricted-customers');
}
protected function registerRoutes() {
Route::group($this->routeConfiguration(), function () {
$this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
});
}
protected function routeConfiguration() {
return [
'middleware' => ['web', 'auth', 'roles'],
];
2024-07-03 11:45:15 +00:00
}
}