-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from JoshMoreno/bugfix/fix-times-method
fix times method when also using the with method
- Loading branch information
Showing
4 changed files
with
51 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
namespace Christophrumpel\LaravelFactoriesReloaded; | ||
|
||
use Illuminate\Support\Collection; | ||
|
||
class MultiFactoryCollection { | ||
protected Collection $factories; | ||
|
||
public function __construct(Collection $factories) | ||
{ | ||
$this->factories = $factories; | ||
} | ||
|
||
public function create(): Collection | ||
{ | ||
return $this->factories->map->create(); | ||
} | ||
|
||
public function make(): Collection | ||
{ | ||
return $this->factories->map->make(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters