Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent
Last updated 2 years ago.
0

Hey,

Have you run a composer dumpautoload -o since you added the class?

If that's not it, how are you calling the methods that it's saying are undefined? From a controller? Could you show the code?

Sam

Last updated 2 years ago.
0

I attempted to do Report::create([...]); in DatabaseSeeder.php which resulted in create not found, and Auth::user()->account->reports (reports() is $this->hasMany('Report')) in a controller, which resulted in newQuery not found.

I did try running dump-autoload to no avail.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.