-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not locate a factory #93
Comments
Let me see your factories file. |
Hi Jeff, I get the same issue as above. But when in iterm2 all works fine apart from 5 of these messages each time.. Warning: include_once(): Failed opening '/Users/nigel/projects/work/laravel/tests/functional' for inclusion (include_path='/Users/nigel/projects/work/laravel/vendor/phpunit/php-text-template:/Users/nigel/projects/work/laravel/vendor/phpunit/php-timer:/Users/nigel/projects/work/laravel/vendor/phpunit/php-file-iterator:.:/Applications/XAMPP/xamppfiles/lib/php') in /Applications/XAMPP/xamppfiles/lib/php/PHPUnit/Util/Fileloader.php on line 95 Hope that might shed some light ont he issue.. |
I'm getting same error, but only in remote server.
Exception trace:
|
I have the same issue. in my case, because the name of // ModelFactory.php
$factory->defineAs(App\Models\User::class, 'superadmin', function ($faker) use ($factory) {
$user = $factory->raw(App\Models\User::class);
return array_merge($user, config('site_default.users.superadmin'));
}); // UserSeeder.php file
factory('App\User', 'superadmin')->create(); // <---- I forget change this. should : App\Models\User
$this->command->comment(PHP_EOL .'User superadmin was generated...'); |
@antoniputra |
oh, are you sure with your remote server environment set up ? you are using external package, I don't familiar with this Exception. [Laracasts\TestDummy\TestDummyException] can you show me your ModelFactories and WishTableSeeder code ? |
@antoniputra I am using Laracast/Testdummy, the very same package in which git repo we talk right now. |
I found it. It was PHP environment problem. |
glad hear it. :D |
#php artisan db:seed --class=TeamsTableSeeder
[Laracasts\TestDummy\TestDummyException]
Could not locate a factory with the name: App\Team
I have done composer dump-autoload and clear-cache
All files are present in their appropriate namespace.
What could be the possible reason for this error?
The text was updated successfully, but these errors were encountered: