Laravel has an authentication course attribute that can help employ authentication and authorization guidelines.
В статье не хватает ссылок на источники (см. рекомендации https://thebookmarkplaza.com/story17940758/the-single-best-strategy-to-use-for-codeigniter-4