Closed 7nohe closed 3 months ago
If you define duplicate namespaces in Laravel’s routing files, the key will be duplicated in the type file generated by laravel-typegen.
web.php
Route::get('/dashboard1', DashboardController::class)->name('dashboard'); Route::get('/dashboard2', DashboardController::class)->name('dashboard');
param.ts
export type RouteParams = { "dashboard": {}; "dashboard": {}; }
Ensure that a namespace (key) that has been used once during generation is not used again. If a duplicate is encountered, output a warning and skip it.
Problem
If you define duplicate namespaces in Laravel’s routing files, the key will be duplicated in the type file generated by laravel-typegen.
web.php
param.ts
Solution
Ensure that a namespace (key) that has been used once during generation is not used again. If a duplicate is encountered, output a warning and skip it.