-
- {{ formatSql(slotProps.entry.content.sql, slotProps.entry.content.driver) }}
+
+ {{ formatQuery(slotProps.entry.content.sql, slotProps.entry.content.driver) }}
diff --git a/src/telescope/vitest.config.js b/src/telescope/vitest.config.js
new file mode 100644
index 0000000000..0daef4c210
--- /dev/null
+++ b/src/telescope/vitest.config.js
@@ -0,0 +1,11 @@
+import vue2 from '@vitejs/plugin-vue2';
+import { defineConfig } from 'vitest/config';
+
+/** @type {import('vitest/config').UserConfig} */
+export default defineConfig({
+ plugins: [vue2()],
+ test: {
+ environment: 'jsdom',
+ include: ['resources/js/**/*.test.js'],
+ },
+});
From 959f9ab79bff7722122a0df0a69632850eee161d Mon Sep 17 00:00:00 2001
From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com>
Date: Tue, 20 Oct 2026 08:14:53 +0000
Subject: [PATCH 09/25] Port Wayfinder's QUERY method tests
laravel/wayfinder#324 (laravel/wayfinder main at 81df21e16dc1) adds
QUERY route support. Hypervel's Wayfinder already has the query Method
type, so port upstream's QueryMethod.test.ts with its SearchController
fixture and two QUERY routes. The usage docs follow with the next
commit's Wayfinder docs. The Wayfinder JavaScript tests in both modes,
the type check and the PHP suite pass.
---
src/wayfinder/tests/QueryMethod.test.ts | 104 ++++++++++++++++++
.../Fixtures/Controllers/SearchController.php | 22 ++++
tests/Wayfinder/Fixtures/routes.php | 4 +
3 files changed, 130 insertions(+)
create mode 100644 src/wayfinder/tests/QueryMethod.test.ts
create mode 100644 tests/Wayfinder/Fixtures/Controllers/SearchController.php
diff --git a/src/wayfinder/tests/QueryMethod.test.ts b/src/wayfinder/tests/QueryMethod.test.ts
new file mode 100644
index 0000000000..c27cb9be1a
--- /dev/null
+++ b/src/wayfinder/tests/QueryMethod.test.ts
@@ -0,0 +1,104 @@
+import { describe, expect, test } from "vitest";
+import { index, show } from "./.generated/actions/Hypervel/Tests/Wayfinder/Fixtures/Controllers/SearchController";
+import search from "./.generated/routes/search";
+
+describe("query only route", () => {
+ test("properties", () => {
+ expect(Object.keys(index)).toEqual([
+ "definition",
+ "url",
+ "query",
+ "form",
+ ]);
+ });
+
+ test("definition", () => {
+ expect(index.definition).toEqual({
+ methods: ["query"],
+ url: "/search",
+ });
+ });
+
+ test("default method", () => {
+ expect(index()).toEqual({
+ url: "/search",
+ method: "query",
+ });
+ });
+
+ test("query", () => {
+ expect(index.query({ query: { page: 2 } })).toEqual({
+ url: "/search?page=2",
+ method: "query",
+ });
+ });
+
+ test("default form method spoofs query over post", () => {
+ expect(index.form()).toEqual({
+ action: "/search?_method=QUERY",
+ method: "post",
+ });
+ });
+
+ test("form query", () => {
+ expect(index.form.query({ query: { page: 2 } })).toEqual({
+ action: "/search?_method=QUERY&page=2",
+ method: "post",
+ });
+ });
+
+ test("named route", () => {
+ expect(search.index()).toEqual({
+ url: "/search",
+ method: "query",
+ });
+ });
+});
+
+describe("get and query route", () => {
+ test("properties", () => {
+ expect(Object.keys(show)).toEqual([
+ "definition",
+ "url",
+ "get",
+ "query",
+ "head",
+ "form",
+ ]);
+ });
+
+ test("default method", () => {
+ expect(show("posts")).toEqual({
+ url: "/search/posts",
+ method: "get",
+ });
+ });
+
+ test("query", () => {
+ expect(show.query("posts")).toEqual({
+ url: "/search/posts",
+ method: "query",
+ });
+ });
+
+ test("form get", () => {
+ expect(show.form.get("posts")).toEqual({
+ action: "/search/posts",
+ method: "get",
+ });
+ });
+
+ test("form query", () => {
+ expect(show.form.query("posts")).toEqual({
+ action: "/search/posts?_method=QUERY",
+ method: "post",
+ });
+ });
+
+ test("named route", () => {
+ expect(search.show.query("posts")).toEqual({
+ url: "/search/posts",
+ method: "query",
+ });
+ });
+});
diff --git a/tests/Wayfinder/Fixtures/Controllers/SearchController.php b/tests/Wayfinder/Fixtures/Controllers/SearchController.php
new file mode 100644
index 0000000000..6c2361da8a
--- /dev/null
+++ b/tests/Wayfinder/Fixtures/Controllers/SearchController.php
@@ -0,0 +1,22 @@
+name('search.index');
+Route::match(['GET', 'QUERY'], '/search/{type}', [SearchController::class, 'show'])->name('search.show');
+
Route::get('/disallowed/delete', [DisallowedMethodNameController::class, 'delete']);
Route::get('/disallowed/delete-method', [DisallowedMethodNameController::class, 'deleteMethod']);
Route::get('/disallowed/query-params', [DisallowedMethodNameController::class, 'queryParams']);
From b493df7cef2559fd79375d2f6c82d99747986ab8 Mon Sep 17 00:00:00 2001
From: Raj Siva-Rajah <5361908+binaryfire@users.noreply.github.com>
Date: Tue, 20 Oct 2026 08:14:53 +0000
Subject: [PATCH 10/25] Add a Wayfinder option to skip the database
laravel/wayfinder#331 (laravel/wayfinder main at 81df21e16dc1) adds
wayfinder:generate --skip-database, for builds where the database is
unreachable. Port the option and BindingResolver::skipDatabase(), which
clears cached columns when the setting changes and is reset by
flushState(). Hypervel types bindings from casts, then the schema, then
docblocks, so skipping the schema falls through to the docblock.
Port upstream's SkipDatabaseTest. Its model is non-incrementing, since
an incrementing key's int cast correctly outranks the docblock. The
test fails without the skip check or the cache reset.
Document the option, noting that casts still apply. wayfinder.md also
takes #324's QUERY usage and form-spoofing paragraphs, adapted to
Route::query(); method override spoofs _method=QUERY over POST.
Formatting, static analysis and the Wayfinder suites pass.
---
src/docs/wayfinder.md | 17 +++++
src/wayfinder/src/BindingResolver.php | 19 +++++
src/wayfinder/src/GenerateCommand.php | 4 +-
tests/Wayfinder/SkipDatabaseTest.php | 103 ++++++++++++++++++++++++++
4 files changed, 142 insertions(+), 1 deletion(-)
create mode 100644 tests/Wayfinder/SkipDatabaseTest.php
diff --git a/src/docs/wayfinder.md b/src/docs/wayfinder.md
index 8c93475c97..0f4bb041b4 100644
--- a/src/docs/wayfinder.md
+++ b/src/docs/wayfinder.md
@@ -74,6 +74,12 @@ php artisan wayfinder:generate --skip-actions
php artisan wayfinder:generate --skip-routes
```
+The `--skip-database` option skips the database schema when typing route model bindings and reads the model's `@property` docblocks instead. Use it when the database is unreachable at build time. Eloquent casts are still used, and bindings without a matching cast or `@property` tag fall back to `string | number | boolean`:
+
+```shell
+php artisan wayfinder:generate --skip-database
+```
+
When the Vite plugin regenerates Wayfinder output during every build, the generated directories may be added to your application's `.gitignore` file. If your deployment does not install Composer dependencies or run the generator, commit the generated files instead and regenerate them whenever your routes or controllers change.