One of the approaches to not repeat the same responses in each controller is to offload it to the so-called "base" Controller which is public and ready for you to use it.
Another approach with response macros - my video: • DRY: Shorter Laravel Responses with M...
- - - - -
Support the channel by checking out our products:
- Enroll in my Laravel courses: https://laraveldaily.teachable.com
- Try our Laravel QuickAdminPanel: https://bit.ly/quickadminpanel
- Purchase my Livewire Kit: https://livewirekit.com
- View Laravel Code Examples: https://laravelexamples.com
- Subscribe to my weekly newsletter: http://bit.ly/laravel-newsletter