25 lines
724 B
PHP
25 lines
724 B
PHP
<?php
|
|
|
|
namespace Tempo\Purchasing\Delivery;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
final class Composition
|
|
{
|
|
public static function routes(string $bundle): void
|
|
{
|
|
$previous = [];
|
|
foreach (Route::getRoutes() as $route) {
|
|
$previous[spl_object_id($route)] = true;
|
|
}
|
|
require $bundle.'/integrations/sgf/internal-requisitions/routes.php';
|
|
require $bundle.'/integrations/sgf/access/routes.php';
|
|
require $bundle.'/integrations/sgf/operational/setup-routes.php';
|
|
foreach (Route::getRoutes() as $route) {
|
|
if (! isset($previous[spl_object_id($route)])) {
|
|
$route->middleware(RuntimeContext::class);
|
|
}
|
|
}
|
|
}
|
|
}
|