Reformat some responses

This commit is contained in:
Bubka
2021-09-07 23:13:20 +02:00
parent f3adb0b5dd
commit 297b55f66f
4 changed files with 18 additions and 9 deletions

View File

@ -24,8 +24,9 @@ class IconController extends Controller
]);
$path = $request->file('icon')->store('public/icons');
$response['filename'] = pathinfo($path)['basename'];
return response()->json(pathinfo($path)['basename'], 201);
return response()->json($response, 201);
}