Replies: 1 comment
-
When you're passing the "id" value to your view, your view is not aware of the "row" object , just the "id" variable. Use $id instead of $row->id in your blade. Use dev tools in your browser to make sure it is populating correctly! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I want to add a delete button to each day. I could edit but not delete. I would appreciate your help.
<button wire:click="destroy(' . $row->id . ')" class="btn btn-sm btn-danger shadow" onclick="return confirm(\'' . __('global.confirm_delete' ) . '\')"><i class="bi bi-trash"></i></button>
` public function destroy($id)
{
$usuarios = User::findOrFail($id);
$usuarios->delete();
Column::make('action') ->label(fn($row) =>view('usuarios.tables.action',[ 'id' =>$row->id ])),
Beta Was this translation helpful? Give feedback.
All reactions