Welcome Guest, Not a member yet? Register   Sign In
Problem with Model()->find() and Model()->findAll()
#6

(This post was last modified: 10-06-2019, 02:57 PM by workoverflow.)

(10-06-2019, 01:04 PM)ciadmin Wrote: More thoughts:
1) I presume UserModel is namespaced, and that you have a something like "use App\Models\UserModel;"
2) The primary key is supposed to be a string, and you are passing an int. Should there be some casting?

1) All my models are in namespace app/Models/Main
2) I use protected $primaryKey = 'id'; it's not a int

I known, you guess that i'm dummy, but i'm sure that something happened with Model. I have used it without any problems yesterday.
Reply


Messages In This Thread
RE: Problem with Model()->find() and Model()->findAll() - by workoverflow - 10-06-2019, 02:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB