diff --git a/app/Http/Controllers/Api/LikeController.php b/app/Http/Controllers/Api/LikeController.php index 09bf161..d782956 100644 --- a/app/Http/Controllers/Api/LikeController.php +++ b/app/Http/Controllers/Api/LikeController.php @@ -30,10 +30,12 @@ class LikeController extends Controller ], 'ejaculation' => $like->ejaculation ]; + return response()->json($data, 409); } $like = Like::create($keys); + return [ 'ejaculation' => $like->ejaculation ]; diff --git a/database/migrations/2019_03_26_224641_create_likes_table.php b/database/migrations/2019_03_26_224641_create_likes_table.php index 08a59c8..773dbd0 100644 --- a/database/migrations/2019_03_26_224641_create_likes_table.php +++ b/database/migrations/2019_03_26_224641_create_likes_table.php @@ -1,8 +1,8 @@ group(function () { Route::post('/likes', 'Api\\LikeController@store'); Route::delete('/likes/{id}', 'Api\\LikeController@destroy'); -}); \ No newline at end of file +});