Php Laravel带电导线增量减量不工作
我正在将步骤功能放入我的待办事项列表项目中 我为livewire创作了一个作曲家 还包括Php Laravel带电导线增量减量不工作,php,laravel,laravel-blade,laravel-livewire,Php,Laravel,Laravel Blade,Laravel Livewire,我正在将步骤功能放入我的待办事项列表项目中 我为livewire创作了一个作曲家 还包括@livewireStyles和 @livewireScripts在页眉和页脚中 这里,我的增量控制不起作用 1)创建.blade.php @csrf ...... @livewire('步骤') 2)step.blade.php 为任务添加STPE {{$steps}} 3)step.php 在这里,您的代码看起来不错,请确保您在laravel服务器上使用它,即php artisan serve命令
@livewireStyles
和
@livewireScripts
在页眉和页脚中
这里,我的增量控制不起作用
1)创建.blade.php
@csrf
......
@livewire('步骤')
2)step.blade.php
为任务添加STPE
{{$steps}}
3)step.php
在这里,您的代码看起来不错,请确保您在laravel服务器上使用它,即php artisan serve
命令平台:
<form method="post" action="{{route('todo.store')}}" class="py-5" >
@csrf
<div class="py-1">
<input type="text" name="title" class="px-2 py-2 border rounded" placeholder="Title">
</div>
......
@livewire('step')
<div>
<input type="text" name="stpe" class="px-2 py-2 border rounded" placeholder="Describe Steps">
</div>
</form>
<div>
<div class="flex-justify-center pb-4 px-4">
<h2 class="text-lg pb-4">Add Stpes for task</h2>
<i wire:click="increment" class ="fas fa-plus px-2 py-1 cursor-pointer "></i>
</div>
{{$steps}}
</div>
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class Step extends Component
{
public $steps = 0;
public function increment()
{
$this->steps++;
}
public function render()
{
return view('livewire.step');
}
}