From cb66839da0c7c0de72b4afbf6f80784bcb98b73c Mon Sep 17 00:00:00 2001 From: Alexey Karapetov Date: Sun, 5 Mar 2017 12:26:28 -0800 Subject: [PATCH] Do not call getAttributes() twice --- src/Resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Resource.php b/src/Resource.php index 407d358..b52230b 100644 --- a/src/Resource.php +++ b/src/Resource.php @@ -80,7 +80,7 @@ public function toArray() if (! $this->isIdentifier()) { $attributes = $this->getAttributes(); if ($attributes) { - $array['attributes'] = $this->getAttributes(); + $array['attributes'] = $attributes; } }