This commit is contained in:
gaofeng
2026-09-01 11:07:13 +08:00
parent f6f37310ce
commit e0aeff2af7
18 changed files with 577 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
$routes = file_get_contents(__DIR__ . '/../route/app.php');
if (!is_string($routes)) {
throw new RuntimeException('Unable to read route configuration');
}
$detail = strpos($routes, "Route::post('customer-center/applicant',");
$save = strpos($routes, "Route::post('customer-center/applicant/save',");
$remove = strpos($routes, "Route::post('customer-center/applicant/remove',");
if ($detail === false || $save === false || $remove === false) {
throw new RuntimeException('Customer center applicant routes are incomplete');
}
if ($save > $detail || $remove > $detail) {
throw new RuntimeException('Specific applicant routes must be registered before the detail route');
}
if (!preg_match("/Route::post\('customer-center\\/applicant',\s*'CustomerCenter\\/applicant'\)->completeMatch\(\);/", $routes)) {
throw new RuntimeException('Applicant detail route must use complete matching');
}
echo "Customer center route order self-check passed\n";