-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in method removeButton: Undefined variable: name #180
Comments
Hi @franciscocorrales , This is very weird. I tried it myself and One bug, though, was that if I removed all buttons from the line stack, it was still showing. I fixed that in Also, I've added two new methods:
Please run a Cheers! |
Oh, I just re-read your answer. Yes, it's possible that was a first draft of the function, but it's long been fixed - $name is there and I just checked on a second machine, different project: it works :-) It's something that a Cheers! P.S. I'll go ahead and close this issue so we don't clog the section. Feel free to open it again if you encounter problems or comment if you have follow-ups. |
Confirmed. Thanks. |
This function, in src/PanelTraits/Buttons.php:
Gives me the error:
Note: If I try with removeButtonFromStack I get the same error.
If I try to edit the line with:
$this->buttons->reject(function ($button) use($name) {
I don't get the error, but the button is not removed!.
This is my code:
Background: what I am trying to achieve, is to stop showing the Actions column empty in the list view, when there's no action (button, I denied most access) there. Also, this column always gets printed, even if there are no buttons (I run this to hard reset the buttons
$this->crud->buttons = collect();
).The text was updated successfully, but these errors were encountered: