{"id":23086693,"url":"https://github.com/mares29/laravel-ip-filter","last_synced_at":"2025-10-13T04:14:13.779Z","repository":{"id":62523992,"uuid":"119753571","full_name":"mares29/laravel-ip-filter","owner":"mares29","description":"Simple IP access filter for Laravel 5+ ","archived":false,"fork":false,"pushed_at":"2018-10-09T09:52:17.000Z","size":7,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T01:49:20.871Z","etag":null,"topics":["ipfilter","laravel","laravel-5-package","laravel-middleware","laravel5"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mares29.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-31T22:49:14.000Z","updated_at":"2020-12-12T19:06:02.000Z","dependencies_parsed_at":"2022-11-02T14:46:28.237Z","dependency_job_id":null,"html_url":"https://github.com/mares29/laravel-ip-filter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mares29/laravel-ip-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mares29%2Flaravel-ip-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mares29%2Flaravel-ip-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mares29%2Flaravel-ip-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mares29%2Flaravel-ip-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mares29","download_url":"https://codeload.github.com/mares29/laravel-ip-filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mares29%2Flaravel-ip-filter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270091707,"owners_count":24525254,"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-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["ipfilter","laravel","laravel-5-package","laravel-middleware","laravel5"],"created_at":"2024-12-16T19:29:49.814Z","updated_at":"2025-10-13T04:14:08.736Z","avatar_url":"https://github.com/mares29.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP Filter for Laravel 5 Application\n\nThis package provide simple way to filter user access by IP addresses for your Laravel 5 application.\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require mares29/laravel-ip-filter\n```\n\nLaravel 5.5+ automaticly register service provider and set Alias thanks to auto-discovery. With lower laravel version add to **app.php** \n\n``` php\n'providers' =\u003e [\n\t\\Mares29\\Breadcrumb\\FilterIpServiceProvider::class,\n]\n```\n\n## Usage\n\nExport filter config.\n\n``` terminal\nphp artisan vendor:publish --provider=\"Mares29\\IpFilter\\FilterIpServiceProvider\"\n```\n\nBy default the filter is active only on **production** environment, but you can specify Your own settings in config file.\n\n``` php\n\t// Env - only use filter on listed environments\n\t'env' =\u003e ['production'],\n```\n\n\nUse one of **black list** or **white list** method. For example, allow acces only from ip address *127.0.0.1*.\n\n``` php\n\t// White list - List of allowed IP addresses\n\t'allowed' =\u003e [\n\t\t'127.0.0.1'\n\t],\n\n\t// Black list - List of denied IP addresses\n\t'denied' =\u003e [],\n```\n\nAdd middleware for all Your web routes.\n\n``` php\nprotected function mapWebRoutes()\n    {\n        Route::middleware('web')\n             -\u003emiddleware('filterIp')\n             -\u003enamespace($this-\u003enamespace)\n             -\u003egroup(base_path('routes/web.php'));\n    }\n```\nOr just for specific routes.\n\n``` php\nRoute::get('/', function () {\n    return view('welcome');\n})-\u003emiddleware('filterIp');\n```\n\n## Credits\n\n- [Karel Mares](https://github.com/mares29)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmares29%2Flaravel-ip-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmares29%2Flaravel-ip-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmares29%2Flaravel-ip-filter/lists"}