Skip to content

Commit

Permalink
v1.2.2 (#9)
Browse files Browse the repository at this point in the history
* Only load control factories when needed
  • Loading branch information
tobytwigger authored Mar 26, 2020
1 parent 9e1a890 commit 27ed08c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.2.2] - (26/03/2020)

### Removed
- Always loading control factories

### Changed
- Only load control factories when the faker class exists

## [1.2.1] - (18/03/2020)

### Added
Expand Down
3 changes: 1 addition & 2 deletions src/ControlDBServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public function register()

public function boot()
{
$this->app->make(Factory::class)->load(__DIR__ . '/../database/factories');
$this->setupRouteModelBinding();
$this->setupRoutes();
}
Expand All @@ -125,7 +124,7 @@ protected function registerConfig()
*/
public function registerFactories()
{
if (!app()->environment('production')) {
if (!app()->environment('production') && class_exists(\Faker\Factory::class)) {
$this->app->make(Factory::class)->load(__DIR__ .'/../database/factories');
}
}
Expand Down

0 comments on commit 27ed08c

Please sign in to comment.