I have started using livewire but I can't make it work im using a wire:click to load a form either on create mode or edit mode, but when I did click all I got was some sort of modal with 404 error
this is the livewire component
namespace App\Http\Livewire;
use Livewire\Component;
class Activities extends Component
{
public $view = 'none';
public function render()
{
return view('livewire.activities');
}
public function create_view(){
$this->view = 'create';
}
public function edit(){
$this->view = 'edit';
}
}
this is the view
<button wire:click="create_view" class="button-warning">{{ __('Create') }}</button>
@if ($view != 'none')
<div class="col-span-6">
@include("livewire.$view")
</div>
@endif
Edit: I load the view manually and it loads correctly, for example:
@if ($view != 'none')
<div class="col-span-6">
@include("livewire.edit")
</div>
@endif