簡體   English   中英

LiveWire 數據綁定問題。 (未捕獲的 ReferenceError:未定義 Livewire)

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM