laravel 11 Class "Illuminate\Foundation\Auth\Brand" not found

42 Views Asked by At

Few hours ago, i fill my User table i had many error, but with help from here i corrected and User works good. Now i need to fill Brand table, it's strange i have exactly the same errors, i corrected except this one (same as before) but this time it doesn't word and i don't understand why whereas i checked many times i have more or less the same code etc For information, i try without Factory and it works actually but i need to do it with factory same for User here a picture Thank you for your help enter image description here

1

There are 1 best solutions below

0
designatedcoder On

In your seeder, you are using Brand as the model which is correct, but your import in the brand model isn't correct as it's coming from the illuminate/auth package, where Brand isn't a thing. Importing it as authenticatable won't work because it doesn't exist. Unless you have a specific reason for using the authenticatable class on the brand model, you can delete that line as well as delete the extends authenticatable. It works on your seeder because you are calling the Brand model without using the authenticatable.