[英]LiveWire Data Binding Problem. (Uncaught ReferenceError: Livewire is not defined)
我是 LiveWire 的新手。 我想我做的一切都是對的。 (根據文檔。)為什么我沒有得到交互? 謝謝..
--- 歡迎刀片 ---
<html> <head> <title>Livewire</title> @livewireStyles </head> <body> @livewire('hello-world') @livewireScripts </body> </html>
--- Controller ---
class HelloWorld extends Component { public $name = 'Ugur'; public function render() { return view('livewire.hello-world'); } }
--- 你好-world.blade ---
<div> <input wire:model="name" type="text"> Hello {{ $name }} </div>
解決了!
我變了;
.env
APP_URL=http:/localhost //TO--> APP_URL=localhost/[project_name]/public
和
配置/livewire.php
'asset_url' => null, //TO--> 'asset_url' => env('APP_URL'),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.