From 609104806b8b639710268c75c22f43034c2b72db Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 29 Oct 2020 09:50:40 -0500 Subject: [PATCH] fix alias usage --- src/Illuminate/Database/Eloquent/Builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index 8370fafd6ea4..b3e8bede7159 100755 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -510,7 +510,7 @@ public function firstOr($columns = ['*'], Closure $callback = null) public function value($column) { if ($result = $this->first([$column])) { - return $result->{$column}; + return $result->{Str::afterLast($column, '.')}; } }