Skip to content

Commit 28437b4

Browse files
committed
Merge branch 'master' of https://github.com/Laravel-Backpack/CRUD into se1exin-issue/100
2 parents f19b44d + 3a00aa4 commit 28437b4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ All Notable changes to `Backpack CRUD` will be documented in this file
2020
- Nothing
2121

2222

23+
## [3.1.10] - 2016-09-16
24+
25+
### Fixed
26+
- removeButton and removeButtonFromStack functionality, thanks to [Alexander N](https://github.com/morfin60);
27+
28+
2329
## [3.1.9] - 2016-09-16
2430

2531
### Added

src/PanelTraits/Buttons.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ public function initButtons()
7777

7878
public function removeButton($name)
7979
{
80-
$this->buttons->reject(function ($button) {
80+
$this->buttons = $this->buttons->reject(function ($button) use ($name) {
8181
return $button->name == $name;
8282
});
8383
}
8484

8585
public function removeButtonFromStack($name, $stack)
8686
{
87-
$this->buttons->reject(function ($button) {
87+
$this->buttons = $this->buttons->reject(function ($button) use ($name, $stack) {
8888
return $button->name == $name && $button->stack == $stack;
8989
});
9090
}

0 commit comments

Comments
 (0)