Support the ongoing development of Laravel.io →
posted 10 years ago
Eloquent

Hi guys, I have a big problem with laravel eloquent model. When I create my application and i create model for example called User and i write

<?php class User extends Eloquent{ protected $table = 'users'; } ?>

and when i access it from the controller. User::where('username',Input....)->first(); it works but sometime it stops working. All models stop working. And i receive this error. Call to undefined method User::where() However If I use any other of the other functions for example User::create I receive this error Call to undefined method Gangster::create() I don't know if that's a problem with eloquent. I'm using wamp..

Last updated 3 years ago.
0

Please format your code and re-post Also, edit your question title to something more specific.

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

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.

© 2025 Laravel.io - All rights reserved.