php - Laravel - No query results for model -


i gettin error 'no query results model [app\user].', when trying find user query.

        if(user::where('email', '=', request::only('email'))->firstorfail()){         $validator->errors()->add(...);     } 

request::only() return array. in case: ['email' => 'the-value-of-email']. either this:

user::where(request::only('email'))->firstorfail() 

or use request::input() retrieve value:

user::where('email', '=', request::input('email'))->firstorfail() 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -