diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php new file mode 100644 index 000000000..1b52e28f2 --- /dev/null +++ b/app/Http/Controllers/ApiController.php @@ -0,0 +1,32 @@ +middleware('auth'); + } + + public function hydrateLikes(Request $request) + { + $this->validate($request, [ + 'min' => 'nullable|integer|min:1', + 'max' => 'nullable|integer', + ]); + + $profile = Auth::user()->profile; + + $likes = Like::whereProfileId($profile->id) + ->orderBy('id', 'desc') + ->take(100) + ->pluck('status_id'); + + return response()->json($likes); + } +}