From f06bacf646bfa1578afa42f9a863c594bcc1fff3 Mon Sep 17 00:00:00 2001 From: Kim Metso Date: Thu, 30 Apr 2020 14:56:56 +0200 Subject: [PATCH] Use value from displayUsing callback parameter instead of $this->value --- src/FieldServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FieldServiceProvider.php b/src/FieldServiceProvider.php index 3c1f669..44c997c 100644 --- a/src/FieldServiceProvider.php +++ b/src/FieldServiceProvider.php @@ -24,8 +24,8 @@ public function boot() Textarea::macro('limit', function($amount, $ending = '...') { if(resolve(NovaRequest::class)->resourceId == null) { - $this->displayUsing(function() use($amount, $ending) { - return str_limit($this->value, $amount, $ending); + $this->displayUsing(function($value) use($amount, $ending) { + return str_limit($value, $amount, $ending); }); }