Support the ongoing development of Laravel.io →
posted 8 years ago
Architecture
Last updated 1 year ago.
0

what happens if you copy & paste trait functions into your controller & try to use them? in your trait you are using Auth, do you not have to declare it at the top?

0

Thanks a lot for your reply!

I have copy pasted the trait functions directly into my controller and then it works perfectly. Looks like there is somethinh wrong with my namespacing but I can't really find out where the problem is.

I am declaring Auth like this: use Illuminate\Support\Facades\Auth; Is that the wrong one?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ajdemoed ajdemoed Joined 10 Dec 2015

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.