Вопрос

I understand how to check if a user exists and log them in, but I need to check what role they play (admin or client) I know to use:

if (!Auth::check('default')) { return $this->redirect('/'); }

but how would I append that to check role?

Это было полезно?

Решение

Li3 only handles authentication directly in the core. For the counterpart responsibility of authorization, you need a library like li3_access. See the README for a breakdown of different possible configurations.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top