What seems to be the problem: I get this error and I don’t know what’s wrong here with my code
namespace App\Http\Livewire\Components;
use App\Models\Products;
use Livewire\Component;
class Delete extends Component
{
public function render()
{
return view('livewire.components.delete');
}
public function delete($id)
{
$product = Products::where('id', $id)->first();
$product->delete();
}
}
and this is my ui component:
Delete