Support the ongoing development of Laravel.io →

omuldinlift

Joined 9 Mar 2015

Statistics

Threads 1
Replies 3
Solutions 0
Articles 0

How to access Auth::user()->id in __construct function of a Controller?

Hi all, I'm trying to access Auth::user() values like this: public function __construct() { $this-&...

0 Likes
8 Replies
replied 9 years ago

How to access Auth::user()->id in __construct function of a Controller?

Is there a way to create a new middleware and "cut" the request from there using this is_a...

0 Likes
replied 9 years ago

How to access Auth::user()->id in __construct function of a Controller?

Is there a way to fix this or should I test if the user is admin in all methods of the controller? R...

0 Likes
replied 9 years ago

How to access Auth::user()->id in __construct function of a Controller?

Am I the only one that want to use a simple admin section by a flag TRUE/FALSE in users TABLE? :)

0 Likes

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.