are you including the User model at the top? if not try adding it in i.e.
use App\UserModel;
or try doing new \Article(...) //notice a back slash /
It sounds as though Auth::user() is returning null.
Make sure you import the class. use Auth;
Make sure you are authenticated.
Thank you guys for your prompt answers and help. Much appreciated.
Adding App\UserModel; did the trick.
Thanks again
Marea
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community