Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel带电导线增量减量不工作_Php_Laravel_Laravel Blade_Laravel Livewire - Fatal编程技术网

Php Laravel带电导线增量减量不工作

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命令

我正在将步骤功能放入我的待办事项列表项目中

我为livewire创作了一个作曲家

还包括
@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');
    }
}