All notable changes to Cloudflare Laravel Request
will be documented in this file.
Bug fix: Agent was failing when the browser was not detectable
Full Changelog: https://github.com/pdphilip/cf-request/compare/v1.0.1...v1.0.2
- Removed Middleware option
Full Changelog: https://github.com/pdphilip/cf-request/compare/v1.0.0...v1.0.1
Cloudflare Laravel Request inherits the request object from Laravel and parses specific headers from Cloudflare to provide additional information about the request, including:
CfRequest::ip()
- Original Client IP (Before it passes through any proxies)CfRequest::country()
- Origin CountryCfRequest::timezone()
- Origin TimezoneCfRequest::city()
- Origin CityCfRequest::region()
- Origin RegionCfRequest::postalCode()
- Origin Postal CodeCfRequest::lat()
- Origin LatitudeCfRequest::lon()
- Origin LongitudefRequest::isBot()
- If it's a botCfRequest::threatScore()
- Threat Score from Cloudflare
The User-Agent is also parsed to provide additional information about the device, including:
CfRequest::deviceType()
- Device Type (mobile, tablet, desktop, tv, etc)CfRequest::deviceBrand()
- Device BrandCfRequest::deviceModel()
- Device ModelCfRequest::os()
- Device OSCfRequest::osVersion()
- Device OS VersionCfRequest::browser()
- Device BrowserCfRequest::browserVersion()
- Device Browser Version
With this package, you can:
- Replace
Request $request
withCfRequest $request
in your controller methods to access the additional methods. - Call the
CfRequest
facade anywhere in your application to access this information.