Created
January 11, 2018 19:58
-
-
Save deleugpn/e0595036f625ce164ce3351897c55216 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // ... | |
| /** | |
| * @param \Illuminate\Http\Request | |
| * @return mixed | |
| */ | |
| public function __invoke(Request $request) | |
| { | |
| $pageSize = min($request->get('page_size'), 1000); | |
| $activities = Activities::paginate($pageSize); | |
| return ActivitiesResource::collection($activities); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment