I am having a weird problem. I have a button on my page that allows users to access a job. depending on the job they want to access a 404 error appears
im using livewire 2.4
The code only verifies if the user is logged in, and if it is not, a modal shows, in that part of the code is where the problem is giving
public $errores = [];
public $success;
public function apply(VacanteModel $vacante)
{
if (auth()->check()) {
/* .... */
} else {
array_push($error, 'You have to log in to your account to apply');
}
$this->errores = '';
$this->errores = $error;
$this->success = '';
}
and in my view the code is:
<button wire:click="apply(4512412368)" >
Apply
</button>