From 15925b856b9fa7de84a7ce8985b77a98ed285fbb Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Thu, 30 Jul 2026 23:13:45 +0300 Subject: [PATCH] remove inertia backend adapter Remove the adapter dependency, middleware, configuration, and frontend route. Leave the backend root unclaimed so the standalone Vue application remains independent. --- .../Http/Middleware/HandleInertiaRequests.php | 46 ------------ backend/bootstrap/app.php | 2 - backend/composer.json | 1 - backend/composer.lock | 74 +------------------ backend/config/inertia.php | 70 ------------------ backend/routes/web.php | 4 - 6 files changed, 1 insertion(+), 196 deletions(-) delete mode 100644 backend/app/Http/Middleware/HandleInertiaRequests.php delete mode 100644 backend/config/inertia.php diff --git a/backend/app/Http/Middleware/HandleInertiaRequests.php b/backend/app/Http/Middleware/HandleInertiaRequests.php deleted file mode 100644 index bdca0a8..0000000 --- a/backend/app/Http/Middleware/HandleInertiaRequests.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ - public function share(Request $request): array - { - return [ - ...parent::share($request), - 'name' => config('app.name'), - 'auth' => [ - 'user' => $request->user(), - ], - ]; - } -} diff --git a/backend/bootstrap/app.php b/backend/bootstrap/app.php index c3e9496..324b7c2 100644 --- a/backend/bootstrap/app.php +++ b/backend/bootstrap/app.php @@ -1,6 +1,5 @@ withMiddleware(function (Middleware $middleware): void { $middleware->web(append: [ - HandleInertiaRequests::class, AddLinkHeadersForPreloadedAssets::class, ]); }) diff --git a/backend/composer.json b/backend/composer.json index 611f358..d63a04c 100644 --- a/backend/composer.json +++ b/backend/composer.json @@ -10,7 +10,6 @@ "license": "MIT", "require": { "php": "^8.3", - "inertiajs/inertia-laravel": "^3.2", "laravel/framework": "^13.17", "laravel/tinker": "^3.0" }, diff --git a/backend/composer.lock b/backend/composer.lock index e2c5d75..425e85d 100644 --- a/backend/composer.lock +++ b/backend/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "29d1e2d51fd6a59e22604be86a53d7bf", + "content-hash": "29bf8331467e53b3167e4f694dc9618d", "packages": [ { "name": "brick/math", @@ -1057,78 +1057,6 @@ ], "time": "2026-07-17T13:53:03+00:00" }, - { - "name": "inertiajs/inertia-laravel", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/inertiajs/inertia-laravel.git", - "reference": "e6ad31fbafb3c8d1c269c93ab12da3712c077744" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/e6ad31fbafb3c8d1c269c93ab12da3712c077744", - "reference": "e6ad31fbafb3c8d1c269c93ab12da3712c077744", - "shasum": "" - }, - "require": { - "ext-json": "*", - "laravel/framework": "^11.35|^12.0|^13.0", - "php": "^8.2.0", - "symfony/console": "^7.0|^8.0" - }, - "conflict": { - "laravel/boost": "<2.2.0" - }, - "require-dev": { - "guzzlehttp/guzzle": "^7.15.2|^8.0", - "larastan/larastan": "^3.0", - "laravel/pint": "^1.16", - "mockery/mockery": "^1.3.3", - "orchestra/testbench": "^9.2|^10.0|^11.0", - "phpunit/phpunit": "^11.5|^12.0" - }, - "suggest": { - "ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command." - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Inertia\\ServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "./helpers.php" - ], - "psr-4": { - "Inertia\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Reinink", - "email": "jonathan@reinink.ca", - "homepage": "https://reinink.ca" - } - ], - "description": "The Laravel adapter for Inertia.js.", - "keywords": [ - "inertia", - "laravel" - ], - "support": { - "issues": "https://github.com/inertiajs/inertia-laravel/issues", - "source": "https://github.com/inertiajs/inertia-laravel/tree/v3.2.1" - }, - "time": "2026-07-29T09:10:23+00:00" - }, { "name": "laravel/framework", "version": "v13.23.0", diff --git a/backend/config/inertia.php b/backend/config/inertia.php deleted file mode 100644 index 70f6b9b..0000000 --- a/backend/config/inertia.php +++ /dev/null @@ -1,70 +0,0 @@ - [ - 'enabled' => true, - 'url' => 'http://127.0.0.1:13714', - // 'bundle' => base_path('bootstrap/ssr/ssr.mjs'), - - ], - - /* - |-------------------------------------------------------------------------- - | Pages - |-------------------------------------------------------------------------- - | - | These options configure how Inertia discovers page components on the - | filesystem. The paths and extensions are used to locate components - | when rendering responses and during testing assertions. - | - */ - - 'pages' => [ - - 'paths' => [ - resource_path('js/pages'), - ], - - 'extensions' => [ - 'js', - 'jsx', - 'svelte', - 'ts', - 'tsx', - 'vue', - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Testing - |-------------------------------------------------------------------------- - | - | The values described here are used to locate Inertia components on the - | filesystem. For instance, when using `assertInertia`, the assertion - | attempts to locate the component as a file relative to the paths. - | - */ - - 'testing' => [ - - 'ensure_pages_exist' => true, - - ], - -]; diff --git a/backend/routes/web.php b/backend/routes/web.php index 8c10e0a..b3d9bbc 100644 --- a/backend/routes/web.php +++ b/backend/routes/web.php @@ -1,5 +1 @@ name('home');