Skip to content

Commit

Permalink
i believe it must be method call here :)
Browse files Browse the repository at this point in the history
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()
        );
    }
```
  • Loading branch information
Vasiliy-Bondarenko authored May 26, 2017
1 parent bd076db commit c1f4f63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Phoenix/EloquentMeta/MetaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

/**
Expand Down

0 comments on commit c1f4f63

Please sign in to comment.