Skip to content

Commit fb0cb91

Browse files
authored
Inertia View path might be different
The view path for Inertia pages might be different in some projects. The default path according to the Inertia documentation is `ressources/js/Pages`. However as a developer I could change it to whatever I like. Even moving the Pages folder to a completely different place. ```js createInertiaApp({ resolve: name => require(`./Madness/${name}`), // ... }) ``` Therefore it is not possible for Laravel to check if a component exists.
1 parent a98d877 commit fb0cb91

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/InertiaResponseRenderer.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44

55
use Inertia\Inertia;
66
use Illuminate\Support\Str;
7-
use Illuminate\Support\Facades\File;
87
use Arcanist\Contracts\ResponseRenderer;
98
use Illuminate\Contracts\Support\Renderable;
109
use Illuminate\Contracts\Support\Responsable;
1110
use Symfony\Component\HttpFoundation\Response;
12-
use Arcanist\Exception\StepTemplateNotFoundException;
1311

1412
class InertiaResponseRenderer implements ResponseRenderer
1513
{
@@ -23,11 +21,6 @@ public function renderStep(
2321
array $data = []
2422
): Response | Responsable | Renderable {
2523
$component = $this->componentBasePath . '/' . Str::studly($wizard::$slug) . '/' . Str::studly($step->slug);
26-
$componentPath = resource_path('js/Pages/' . $component . '.vue');
27-
28-
if (!File::exists($componentPath)) {
29-
throw new StepTemplateNotFoundException($step);
30-
}
3124

3225
$viewData = [
3326
'arcanist' => array_filter([

0 commit comments

Comments
 (0)