小编Aur*_*lie的帖子

在我的 Inertia laravel 应用程序中获取 View [app] not found 错误

我正在尝试在我的 laravel 应用程序中使用惯性。我的应用程序不需要 jetstream,所以我不会使用它。所以我去了惯性网站https://inertiajs.com/来安装它,但我不确定我是否正确地安装了它。

我的页面上出现的错误是

查看[应用程序]未找到。

这就是我的 ProductController 中的内容

public function index()
{
    return Inertia::render('components/products/Index');
}
Run Code Online (Sandbox Code Playgroud)

这是我的 Index.vue

<template>
    <div>
        <h1>Welcome</h1>
        <p>Hello, welcome to your first Inertia app!</p>
    </div>
</template>

<script>
    export default {
        components: {

        },
        props: {

        },
    }
</script>
Run Code Online (Sandbox Code Playgroud)

在我的 app.blade.php 中

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <title>Admin</title>

    <link rel="stylesheet" href="/vendor/adminlte/plugins/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="/css/style.css">

</head>
<body class="hold-transition sidebar-mini">
    <div class="wrapper">

    <!-- Navbar -->
    <nav class="main-header navbar …
Run Code Online (Sandbox Code Playgroud)

inertiajs laravel laravel-8

6
推荐指数
1
解决办法
6246
查看次数

标签 统计

inertiajs ×1

laravel ×1

laravel-8 ×1