Hi all - Just starting to figure out Livewire on a vanilla Laravel 8 install and am hitting a 404 error on the dashboard from the @livewire('navigation-menu').
I've updated by .env file
APP_URL=http://localhost/dev/qkAdminPnl/todos/
and my config/livewire.php
'asset_url' => env('APP_URL', 'http://localhost'),
and have included the @LivewireStyles and @LivewireScripts in the app.blade.php file
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap">
<!-- Styles -->
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
@livewireStyles
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<!-- Alpine.js -->
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js" defer></script>
</head>
<body class="font-sans antialiased">
<x-jet-banner />
<div class="min-h-screen bg-gray-100">
@livewire('navigation-menu')
<!-- Page Heading -->
@if (isset($header))
<header class="bg-white shadow">
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
{{ $header }}
</div>
</header>
@endif
<!-- Page Content -->
<main>
@if(session()->has('message'))
<div class="w-full bg-green-100 text-green-900 text-center">
{{ session()->get('message') }}
</div>
@endif
<!-- custom errors -->
@if(session()->has('errs'))
<div class="w-full bg-red-100 text-red-900 text-center">
{{ session()->get('errs') }}
</div>
@endif
{{ $slot }}
</main>
</div>
@stack('modals')
@livewireScripts
</body>
</html>
I must still be missing something, but not seeing it. All help is appreciated!
Thanks - Rick