{"id":21141894,"url":"https://github.com/matthewbdaly/laravel-internal-requests","last_synced_at":"2025-07-09T05:32:08.571Z","repository":{"id":62525223,"uuid":"111217805","full_name":"matthewbdaly/laravel-internal-requests","owner":"matthewbdaly","description":"Make internal requests against your Laravel application","archived":false,"fork":false,"pushed_at":"2018-09-20T20:15:37.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T17:47:47.540Z","etag":null,"topics":["laravel","laravel-5-package","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewbdaly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-18T15:48:59.000Z","updated_at":"2023-11-10T23:27:46.000Z","dependencies_parsed_at":"2022-11-02T15:30:56.699Z","dependency_job_id":null,"html_url":"https://github.com/matthewbdaly/laravel-internal-requests","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/matthewbdaly/laravel-internal-requests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-internal-requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-internal-requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-internal-requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-internal-requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewbdaly","download_url":"https://codeload.github.com/matthewbdaly/laravel-internal-requests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewbdaly%2Flaravel-internal-requests/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263931987,"owners_count":23531704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-5-package","php"],"created_at":"2024-11-20T07:38:16.817Z","updated_at":"2025-07-09T05:32:08.322Z","avatar_url":"https://github.com/matthewbdaly.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-internal-requests\n\n[![Build Status](https://travis-ci.org/matthewbdaly/laravel-internal-requests.svg?branch=master)](https://travis-ci.org/matthewbdaly/laravel-internal-requests)\n[![Coverage Status](https://coveralls.io/repos/github/matthewbdaly/laravel-internal-requests/badge.svg?branch=master)](https://coveralls.io/github/matthewbdaly/laravel-internal-requests?branch=master)\n\nMake internal requests against your Laravel application.\n\nInstallation\n------------\n\n```\ncomposer require matthewbdaly/laravel-internal-requests\n```\n\nWhat do I want this for?\n------------------------\n\nI've used this approach for a mobile app that had offline functionality. Every time it made a change to some data, it needed to be able to store the changes locally. Then, when the app was online again, it needed to send the changes up in a batch so that they could be synced. I created a sync endpoint that used something like this to loop through every request in the batch and process it all in one go. If one failed, I could then catch the exception and persist the unsynced changes in a table in the database so that they could be resolved later without losing the data.\n\nI honestly can't think of any other situation where you'd want to use this approach, but someone else may.\n\nUsage\n-----\n\nType-hint the interface `Matthewbdaly\\LaravelInternalRequests\\Contracts\\Services\\MakesInternalRequests` to retrieve the internal request service. Then use it as follows:\n\n```php\n$service-\u003erequest('POST', '/api/resource', ['content' =\u003e 'blah']);\n```\n\nAny one request accepts three arguments:\n\n* The HTTP verb to use\n* The route to hit\n* The payload (optional)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewbdaly%2Flaravel-internal-requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewbdaly%2Flaravel-internal-requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewbdaly%2Flaravel-internal-requests/lists"}