@if ($crud->buttons->where('stack', $stack)->count())
	@foreach ($crud->buttons->where('stack', $stack) as $button)
	  @if ($button->type == 'model_function')
		@if ($stack == 'line')
	  		  {!! $entry->{$button->content}($crud); !!}
		@else
			  {!! $crud->model->{$button->content}($crud); !!}
		@endif
	  @else
		@include($button->content, ['button' => $button])
	  @endif
	@endforeach
@endif

@if ($crud->buttons->where('stack', $stack)->count())
	@foreach ($crud->buttons->where('stack', $stack) as $button)
	  @if ($button->type == 'model_function')
		@if ($stack == 'line')
	  		  {!! $entry->{$button->content}($entry); !!}
		@else
			  {!! $crud->model->{$button->content}($crud); !!}
		@endif
	  @else
		@include($button->content, ['button' => $button])
	  @endif
	@endforeach
@endif

--- 
+++ 
@@ -2,7 +2,7 @@
 	@foreach ($crud->buttons->where('stack', $stack) as $button)
 	  @if ($button->type == 'model_function')
 		@if ($stack == 'line')
-	  		  {!! $entry->{$button->content}($entry); !!}
+	  		  {!! $entry->{$button->content}($crud); !!}
 		@else
 			  {!! $crud->model->{$button->content}($crud); !!}
 		@endif
Fix access to $crud in button from model function

If stack is 'line' and button type is 'model_function' you don't have access to the `$crud` object.

I think it's wrong anyway because we're calling the same method with two different parameter types: 
line 5 `$entry->{$button->content}($entry)`  <-- here we won't have `$crud` available to the method; instead `$entry` is unnecessarily passed as parameter, it will be available implicitly as `$this`
and
line 7 `$crud->model->{$button->content}($crud)`