Skip to content

Commit

Permalink
merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Endi committed Jul 29, 2018
2 parents 451eb35 + 10a6df9 commit db463fb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ install:
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi

script: vendor/bin/phpunit
script: vendor/bin/phpunit
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Software License][ico-license]](LICENSE.md)
[![Build Status](https://travis-ci.com/adminarchitect/core.svg?branch=master)](https://travis-ci.com/adminarchitect/core)


Missing Laravel Administration Framework. It's like ActiveAdmin for Laravel.

### Docs
Expand Down
11 changes: 7 additions & 4 deletions src/Traits/LoopsOverRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ protected function fetchRelationValue($eloquent, $name, array $relations = [], $

// Treat BelongsToMany form relation as array of values.
if ($object instanceof BelongsToMany) {
return \DB::table($object->getTable())
->where($this->getQualifiedForeignKeyName($object), $orig->getKey())
->pluck($this->getQualifiedRelatedKeyName($object))
->toArray();
return array_map(
'intval',
\DB::table($object->getTable())
->where($this->getQualifiedForeignKeyName($object), $orig->getKey())
->pluck($this->getQualifiedRelatedKeyName($object))
->toArray()
);
}

$object = $object->getResults();
Expand Down
6 changes: 2 additions & 4 deletions tests/Controllers/AuthControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public function setUp()
->setMethods(['attempt', 'logout'])
->getMock();

$this->controller->method('guard')
->willReturn($this->guard);
$this->controller->method('guard')->willReturn($this->guard);

parent::setUp();
}
Expand All @@ -52,11 +51,10 @@ public function it_shows_the_login_form()
->method('auth')
->with('login')
->willReturn('login.view');
app()->instance('scaffold.template', $template);

View::shouldReceive('make')->once()->with('login.view');

app()->instance('scaffold.template', $template);

$this->controller->getLogin();
}

Expand Down

0 comments on commit db463fb

Please sign in to comment.