Skip to content
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

(livewire) Trait HasFactory not found when register #11

Closed
imClement opened this issue Sep 2, 2020 · 1 comment
Closed

(livewire) Trait HasFactory not found when register #11

imClement opened this issue Sep 2, 2020 · 1 comment

Comments

@imClement
Copy link
Contributor

  • Jetstream Version: 0.0.4
  • Laravel Version: 8.x-dev
  • PHP Version: 7.4.9
  • Database Driver & Version: Mysql 8.0.21

Description:

Trying to register I am getting the following trait not found error:

Symfony\Component\ErrorHandler\Error\FatalError thrown with message "Trait 'Illuminate\Database\Eloquent\Factories\HasFactory' not found"

Stacktrace:
#0 Symfony\Component\ErrorHandler\Error\FatalError in /home/im-possible/projects/dev/test01/app/Models/User.php:14

Steps To Reproduce:

  1. Install Laravel
  2. Manually create "Models" folder (see note 1)
  3. Install Jetstream. (see note 2)
  4. php artisan jetstream:install livewire --teams
  5. php artisan migrate
  6. Register

Note 1: While the Models folder is not automatically created in step 1, I did it manually in step 2
Note 2: After step 4 ( jetstream:install ) there are 2 Users.php files ( one in App and one in App/Model )

@imClement imClement changed the title (livewire) Trait HasFactory not found (livewire) Trait HasFactory not found when register Sep 2, 2020
@imClement
Copy link
Contributor Author

The issue does not exist if the install steps are correct and includes

  • create App/Models folder
  • move App/User.php into App/Models folder
  • update the model namespace, user factory and config/auth.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant