Partial model updates in Laravel
Michael Dyrynda, one of the co-hosts of the Laravel News and the North Meets South podcasts, explains how to easily uptime your models with data coming from requests.
Instead of littering your controller method with multiple request()->has('field') checks, you can employ the request object's intersect method. The intersect method will return a new array containing only the keys that are present in both the specified list and the request itself.Using intersect allows you to easily handle a PATCH request - one where you partially update a resource's data, rather than all of it as with a PUT - in a much more concise manner.
https://dyrynda.com.au/blog/partial-model-updates-in-laravel
What are your thoughts on "Partial model updates in Laravel"?