diff --git a/stubs/factory.blade.php b/stubs/factory.blade.php index e53798e5..4cb1fd09 100644 --- a/stubs/factory.blade.php +++ b/stubs/factory.blade.php @@ -1,6 +1,8 @@ namespace {{$namespace}}; +@if (!empty($fields)) use Faker\Generator as Faker; +@endif use Illuminate\Database\Eloquent\Factories\Factory; use {{$modelNamespace}}\{{$entity}}; diff --git a/tests/fixtures/CommandTest/factory.php b/tests/fixtures/CommandTest/factory.php index 9b31f8a5..141edaa2 100644 --- a/tests/fixtures/CommandTest/factory.php +++ b/tests/fixtures/CommandTest/factory.php @@ -2,7 +2,6 @@ namespace RonasIT\Support\Tests\Support\Command\Factories; -use Faker\Generator as Faker; use Illuminate\Database\Eloquent\Factories\Factory; use RonasIT\Support\Tests\Support\Command\Models\Post;