Загрузка...

Laravel Tips - What is Single Action Controller?

#laravel #php #web You may be very familiar with Laravel controller. But if a controller action is particularly complex, what's your typical way to implement it? You might find it convenient to dedicate an entire controller class to that single action. To accomplish this, you may define a single __invoke method within the controller. Follow this video and see how to define such single action controller. For the "The Class You Must Know: Collection", please watch: https://www.youtube.com/watch?v=TFHAMi8mPFg For the video on how to define singleton dependency in service provider, please watch: https://www.youtube.com/watch?v=qDJsC1O6yHM For the video on how to use contextual binding, please watch: https://www.youtube.com/watch?v=7PBE0XliXLY For the video on binding typed variadics, please watch: https://www.youtube.com/watch?v=tVzIe4jVUtA For all the Laravel videos, please follow the playlist: https://www.youtube.com/playlist?list=PL2fGiugrNoohoMozhdKKPN7ZPzbCqWd6M

Видео Laravel Tips - What is Single Action Controller? автора Как начать карьеру фриланс-программиста
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки