in ideal app - every class and every method is tiny.
I made common class for each controllers for example CompanyController has CompanyService which includes update, store and other methods. Is it Ok? And I'm a little confused with facades, where I should or can use them?
I made common class for each controllers for example CompanyController has CompanyService which includes update, store and other methods. Is it Ok? And I'm a little confused with facades, where I should or can use them?
it is absolutely ok. Don't use facades for that. Just ask needed service instance in controller constructor or method parameter and use it.
Мужики привет, сейчас разбираюсь с Laravel Passport. Интересует такой вопрос. Вот у меня есть апи роут /api/user который проходит через мидлварь auth:api. Я передаю bearer токен который получил при аутентификации на роут /api/user и получаю данные о юзере, все окей. А дальше как? Мне получается при каждом запросе к апи роуту передавать этот токен? Или это как то по другому должно работать?