Skip to content

Commit

Permalink
Merge pull request #1 from caffeinated/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Венелин Илиев authored Jul 13, 2016
2 parents 1a82a11 + e8f3588 commit 639bcb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Console/Generators/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function fire()

if ($this->module->exists($slug)) {
$this->modulePath = $this->module->getPath();
$this->moduleInfo = collect($this->module->where('slug', $slug)->first());
$this->moduleInfo = collect($this->module->where('slug', $slug));

$this->container['slug'] = $slug;
$this->container['name'] = $name;
Expand Down
8 changes: 3 additions & 5 deletions src/Repositories/LocalRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function slugs()
*/
public function where($key, $value)
{
return $this->all()->where($key, $value);
return collect($this->all()->where($key, $value)->first());
}

/**
Expand Down Expand Up @@ -207,8 +207,7 @@ public function disabled()
*/
public function isEnabled($slug)
{
$module = $this->where('slug', $slug)
->first();
$module = $this->where('slug', $slug);

return $module['enabled'] === true;
}
Expand All @@ -222,8 +221,7 @@ public function isEnabled($slug)
*/
public function isDisabled($slug)
{
$module = $this->where('slug', $slug)
->first();
$module = $this->where('slug', $slug);

return $module['enabled'] === false;
}
Expand Down

0 comments on commit 639bcb8

Please sign in to comment.