From c1f4f63851d9a9b20cd6b884a6497bd30c13f1dd Mon Sep 17 00:00:00 2001 From: Vasiliy-Bondarenko Date: Sat, 27 May 2017 02:02:52 +0700 Subject: [PATCH] i believe it must be method call here :) tested in my app like this: ``` /** @test */ public function get_all() { // given $user = $this->user; // action $user->addMeta('key', 'value'); $user->addMeta('other', 'another_value'); // assert $user = $user->fresh(); $this->assertEquals( ['key' => 'value', 'other' => 'another_value'], $user->getAllMeta()->toArray() ); } ``` --- src/Phoenix/EloquentMeta/MetaTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phoenix/EloquentMeta/MetaTrait.php b/src/Phoenix/EloquentMeta/MetaTrait.php index 9cb0c62..83f25fc 100644 --- a/src/Phoenix/EloquentMeta/MetaTrait.php +++ b/src/Phoenix/EloquentMeta/MetaTrait.php @@ -12,7 +12,7 @@ trait MetaTrait */ public function getAllMeta() { - return new Collection($this->meta->pluck('value', 'key')); + return new Collection($this->meta()->pluck('value', 'key')); } /**