{"id":18026457,"url":"https://github.com/timoschwarzer/laravel-cloudflare","last_synced_at":"2025-07-21T17:31:37.727Z","repository":{"id":90393938,"uuid":"103831132","full_name":"timoschwarzer/laravel-cloudflare","owner":"timoschwarzer","description":"Simple way to determine IP address and current country of the client when using CloudFlare","archived":false,"fork":false,"pushed_at":"2017-09-17T13:32:38.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T17:46:11.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/timoschwarzer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-17T13:31:58.000Z","updated_at":"2020-10-31T13:19:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"cadcc70d-9066-428c-88e0-53f9454c1e24","html_url":"https://github.com/timoschwarzer/laravel-cloudflare","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/timoschwarzer/laravel-cloudflare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschwarzer%2Flaravel-cloudflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschwarzer%2Flaravel-cloudflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschwarzer%2Flaravel-cloudflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschwarzer%2Flaravel-cloudflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timoschwarzer","download_url":"https://codeload.github.com/timoschwarzer/laravel-cloudflare/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschwarzer%2Flaravel-cloudflare/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266342809,"owners_count":23914262,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-30T08:06:49.640Z","updated_at":"2025-07-21T17:31:37.665Z","avatar_url":"https://github.com/timoschwarzer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CloudFlare for Laravel\n\nThis [Laravel](https://laravel.com/) package helps to determine \nthe IP address and current country of the client \nwhen using [CloudFlare](https://cloudflare.com).\n\n## Installation\n\nFrom the command line, run:\n\n```\ncomposer require sumanion/laravel-cloudflare\n```\n\n## Available Methods\n\n- [`SumanIon\\CloudFlare::isTrustedRequest():bool`]() - \n  Returns `true` when current request is coming from *CloudFlare*, \n  otherwise returns `false`.\n\n- [`SumanIon\\CloudFlare::onTrustedRequest(Closure):mixed`]() - \n  Executes the `Callback` and returns it's return value \n  when current request is coming from *CloudFlare*, otherwise returns `null`.\n\n- [`SumanIon\\CloudFlare::ip():string`]() - \n  Returns current IP address of the client.\n\n\u003e **Note:** When a website is using *CloudFlare* nameservers \n\u003e the `$_SERVER['REMOTE_ADDR']` points to *CloudFlare*, and we have\n\u003e to do extra validation to get \"the real\" IP address of the client.\n\n- [`SumanIon\\CloudFlare::country():string`]() - \n  Returns current country of the client.\n\n\u003e **Note:** *CloudFlare* usually sends a `CF_IPCOUNTRY` HTTP header\n\u003e with current country of the client.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoschwarzer%2Flaravel-cloudflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoschwarzer%2Flaravel-cloudflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoschwarzer%2Flaravel-cloudflare/lists"}