How to Make an Internal Request in Laravel
There are times when you want to develop and use a single request API, rather than working with Livewire or calling a function directly. For example, when you’r
There are times when you want to develop and use a single request API, rather than working with Livewire or calling a function directly.
For example, when you’re building a frontend with Blade or Livewire, instead of calling a function from the controller, you can turn the function’s features into an API and handle things by making an internal request from the controller.
The downside is that a call still occurs internally! The advantage is that you can manage and develop everything through a single API. Later, you can simply hand the API over to additional developers, whether they’re working on Blade or another frontend, so they can build a redesigned frontend.