Enad Abuzaid
Enad Abuzaid

Reputation: 23

I am using laravel livewire 3 get page not found

when click I get page not found and in consle error : POST http://localhost/livewire/update 404 (Not Found)

counter.blade.php

<div>
    <h1>{{ $this->count }}</h1>

    <button wire:click="increment">+</button>

    <button wire:click="decrement">-</button>
</div>

in blade I have the following :

@section('custom-js')
     @livewireScripts
@endsection

@section('custom-css')
    @livewireStyles
@endsection


<livewire:counter />

when click on increment or decrement I get page not found

Upvotes: 1

Views: 521

Answers (2)

Freddy Caicedo
Freddy Caicedo

Reputation: 1

You must create livewire component first

php artisan make:livewire CreatePost

an update function into Livewire component.

public function update(){...}

Upvotes: 0

Ayoub ASSAOUD
Ayoub ASSAOUD

Reputation: 150

If you are using Livewire3, then no need to inject css & javascript of livewire assets manualy, because they are automaticaly injected.

check this documentation page to see.

Upvotes: 0

Related Questions