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, '.')}; } }