Member
aniya.jaskolski
How to return empty json as {} in laravel?
darion
@aniya.jaskolski
You can return an empty JSON response as {} in Laravel using the following code snippet:
{}
1
return response()->json([], 200);
This will create an empty JSON response with a status code of 200.