diff --git a/src/MediaController.php b/src/MediaController.php index 85aa46c..f544fd9 100644 --- a/src/MediaController.php +++ b/src/MediaController.php @@ -66,7 +66,7 @@ class MediaController $collection->runCallback('after', $model->fresh()); - return $isSingle ? MediaData::from($medias->first()) : MediaData::collect($medias); + return $isSingle ? MediaData::from($medias->first()) : response(MediaData::collect($medias), 201); } protected function storeDeferred(Request $request)