Files
mareike/app/Providers/InertiaProvider.php
T
2026-01-31 20:07:41 +01:00

27 lines
478 B
PHP

<?php
namespace App\Providers;
use Inertia\Inertia;
use Inertia\Response;
final class InertiaProvider
{
private string $vueFile;
private array $props;
public function __construct(string $vueFile, array $props) {
$this->vueFile = $vueFile;
$this->props = $props;
}
public function render() : Response {
return Inertia::render(
str_replace('/', '/Views/', $this->vueFile),
$this->props
);
}
}