Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nafeeur10's avatar

Laravel routes not processing React pages during Shopify Laravel

I am using this solution for Shopify App Development: https://github.com/Kyon147/laravel-shopify

Here I used this React Frontend Template structure: https://github.com/Shopify/shopify-frontend-template-react

Laravel routes:

Route::middleware(['verify.shopify'])->group(function () {
    Route::get('/{path?}', function () {
        return view('app');
    })->where('path', '.*');
});

app.blade.php:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Pre Order, Stock Counter and Get Quote</title>

    @viteReactRefresh
    @vite('resources/css/app.css')
    @vite('resources/js/index.jsx')
</head>
<body></body>
</html>

But I don't know why only the home page is loading after refreshing the page. Other routes are not working after refresh. Giving 404 Laravel pages.

What could be the error?

0 likes
0 replies

Please or to participate in this conversation.