get('page', 1); return Cache::remember($source->slug . '_' . $currentPage, 3600, function () use ($source) { // Cache for an hour return response()->json([ 'source' => new SourceResource($source), 'articles' => $source->articles()->with('source')->latest('published_date')->paginate(8) ]); }); } }