Narrow the controller method type and prioritize HTTP methods (#83)
Fixes #76. The generated RouteDefinition and MethodRoute types previously declared method: string, which forced casts when handing the result to libraries like Inertia that expect 'get' | 'post' | 'put' | 'patch' | 'delete'. The output now uses a literal union, so:
router.visit(SomeController.update(), { data: { ... } });just works. On top of that, LaravelControllerTransformedProvider accepts a new httpMethodsPriority argument that doubles as both filter and sort order. Methods absent from the list are dropped from the output, and the ones that survive are emitted in list order. The default is ['get', 'post', 'put', 'patch', 'delete'], so HEAD and OPTIONS (auto-registered by Laravel for every GET route, never invoked by SPAs) are no longer emitted.
If you actually relied on the HEAD entries, pass a custom list including 'head'. Thanks @rubenvanassche.