A
A
Andrey Boychenko2016-05-06 16:45:58
Laravel
Andrey Boychenko, 2016-05-06 16:45:58

Not a question, but rather a request to clarify the point with Laravel?

Good afternoon! Please tell me how to use laravel authorization correctly, is it possible to make it so that all routes that have the word "dashboard" in their path are automatically checked for the presence of an authorized user? Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Muhammad, 2016-05-06
@muhammad_97

It is possible through middleware, as answered above: to register it in the constructor of the base admin controller (a separate controller from which other admin controllers are inherited). If you plan to create roles, then I advise the package: https://github.com/Zizaco/Entrust

W
webmoder, 2016-05-06
@webmoder

https://laravel.com/docs/5.2/middleware everything is written there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question