RouteServiceProvider or routes/web.php. The bundle’s routing.yml can be manually included or adapted to Laravel’s routing syntax.config/packages/vdm_version.yaml can be placed in config/vdm_version.php (converted via config:transform) or merged into an existing config file.secret parameter adds a basic auth layer, which can be extended with Laravel’s middleware (e.g., api or custom middleware) for stricter access control.versions array allows manual configuration or dynamic population (e.g., via service providers or environment variables). This accommodates both static and runtime-driven versioning.path or secret) could lead to exposed endpoints or unauthorized access. Mitigate via:
APP_VERSION) or dynamic discovery (e.g., composer.json parsing) to auto-populate versions.throttle middleware.composer.json, Git tags, or runtime detection?)VersionService) or statically configured?secret mechanism sufficient, or should JWT/OAuth be layered on top for sensitive environments?/health) include version validation?symfony/routing, symfony/http-kernel) to avoid reinventing routing/configuration.Symfony\Bridge\Laravel\ServiceProvider).config:transform or manually merged into config/app.php./version to validate compatibility (e.g., reject requests if backend version is incompatible).config/vdm_version.php (or merge into config/app.php):
'vdm_version' => [
'secret' => env('VERSION_SECRET'),
'path' => '/api/version',
'versions' => [
'frontend' => env('FRONTEND_VERSION', 'unknown'),
'backend' => env('APP_VERSION', 'unknown'),
],
],
.env):
APP_VERSION=1.2.3
FRONTEND_VERSION=2.1.0
VERSION_SECRET=your_secure_secret
routes/web.php or routes/api.php:
Route::get('/version', [\VdmVersionBundle\Controller\VersionController::class, 'index']);
Route::get('/version', function () {
return response()->json(config('vdm_version.versions'));
})->middleware('throttle:60,1'); // Rate limiting
can gates.versions array with custom logic (e.g., database queries for dynamic versions).APP_VERSION in .env on deploy.secret configuration and middleware.composer.json) are updated.route:list to verify endpoint registration./version for auditing.secret.Cache::remember):
return Cache::remember('app_versions', 60, function () {
return config('vdm_version.versions');
});
How can I help you explore Laravel packages today?