laravel-livewire

A Livewire component was not found after creating a component in a custom path

筅森魡賤 提交于 2021-01-28 07:50:32
问题 As stated in the docs, you can create a component in a custom path, which is different from the default views/livewire/ and Http/Livewire . Just for the sake of better organization, I created subfolders: $ php artisan make:livewire tutorial/counter So I got my files in the following paths: views/livewire/tutorial/counter.blade.php Http/Livewire/Tutorial/Counter.php To test the component in a view, I created a /livewire/tutorial/welcome.blade.php which has the following: <!DOCTYPE html> <html

Why Laravel-livewire 'wire:model' not working?

做~自己de王妃 提交于 2020-12-14 23:39:45
问题 I am using Laravel 8. My Livewire Controller <?php namespace App\Http\Livewire; use Livewire\Component; class SearchDropdown extends Component { public $search = 'hello there'; public function render() { return view('livewire.search-dropdown'); } } Livewire blade <div class="relative mt-3 md:mt-0"> <input wire:model="search" type="text" class="bg-gray-800 text-sm rounded-full w-64 px-4 pl-8 py-1 focus:outline-none focus:shadow-outline" placeholder="Search"> <div class="absolute top-0"> <svg

Why Laravel-livewire 'wire:model' not working?

♀尐吖头ヾ 提交于 2020-12-14 23:39:22
问题 I am using Laravel 8. My Livewire Controller <?php namespace App\Http\Livewire; use Livewire\Component; class SearchDropdown extends Component { public $search = 'hello there'; public function render() { return view('livewire.search-dropdown'); } } Livewire blade <div class="relative mt-3 md:mt-0"> <input wire:model="search" type="text" class="bg-gray-800 text-sm rounded-full w-64 px-4 pl-8 py-1 focus:outline-none focus:shadow-outline" placeholder="Search"> <div class="absolute top-0"> <svg