sleeping-owl / admin

Administrative interface builder for Laravel
http://sleeping-owl.github.io/
MIT License
503 stars 261 forks source link

AdminAuth::user() does not work in menu.php #178

Open MinzhangWei opened 9 years ago

MinzhangWei commented 9 years ago

Hi, I wan to use the auth user id for permission control in menu.php, but I can not get anything when using AdminAuth::user() in menu.php.

Can you tell to how to get login user id, or is there any another way for the permission control?

MinzhangWei commented 9 years ago

BTW, I'm using the dev-master version.

xnhinzkyx commented 9 years ago

Me too, got same issue. Hope you can help us with this one. It's a great package for Laravel.

MinzhangWei commented 9 years ago

Hi, is any update for it?

MinzhangWei commented 9 years ago

It's a good package, but the response is so slow and I changed to another one. thanks

eugenem commented 9 years ago

working nice:

menu.php:

if( AdminAuth::user() && AdminAuth::user()->id == 1 )
    Admin::menu('App\Models\Administrator')->icon('fa-user');
xnhinzkyx commented 9 years ago

Great! thanks..