laravel check if request is empty
// https://laravel.com/docs/8.x/requests
// Determines if a value is present on the request
if($request->has('name')) {
// logic ...
}
// Determine if a value is present on the request and is not empty
if($request->filled('name')) {
// Not empty
// Logic ..
}
// OR
if(!empty($request->input('user_id'))) {
// Not empty
// Logic ..
}
// Check if All Request Input empty / not
if(count($request->all()) > 0) {
// all request input not empty.
// Logic ....
} else {
// all request inputs empty.
// Logic
}