Skip to content

Commit

Permalink
Added Laravel 8 support
Browse files Browse the repository at this point in the history
* Laravel 8 support
* Orchestra/testbench upgrade
  • Loading branch information
chiranjeeb-ranium authored Nov 26, 2020
1 parent c004784 commit e1f1067
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"type": "library",
"require": {
"php": "^7.2",
"illuminate/database": "^6.0|^7.0"
"illuminate/database": "^6.0|^7.0|^8.0"
},
"require-dev": {
"orchestra/testbench": "^3.8|^4.0|^5.0",
"orchestra/testbench": "^3.8|^4.0|^5.0|^6.0",
"phpunit/phpunit": "^8.0|^9.0"
},
"autoload": {
Expand Down
8 changes: 4 additions & 4 deletions src/Traits/SeedOnce.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ trait SeedOnce {
* @param bool $silent
* @return $this
*/
public function call($class, $silent = false)
public function call($class, $silent = false, array $parameters = [])
{
if ($this->hasSeeded($class)) {
if ($silent === false && isset($this->command)) {
Expand All @@ -22,7 +22,7 @@ public function call($class, $silent = false)
return $this;
}

parent::call($class, $silent);
parent::call($class, $silent, $parameters);

return $this;
}
Expand All @@ -34,15 +34,15 @@ public function call($class, $silent = false)
*
* @throws \InvalidArgumentException
*/
public function __invoke()
public function __invoke(array $parameters = [])
{
$class = get_class($this);

if ($this->hasSeeded($class)) {
return;
}

$return = parent::__invoke();
$return = parent::__invoke($parameters);

$this->markSeeded($class);

Expand Down

0 comments on commit e1f1067

Please sign in to comment.