rmunate / agent-detection
Detect devices, browsers, operating systems, and crawlers from the user agent, with Laravel Blade directives.
Requires
- php: ^8.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
- jaybizzle/crawler-detect: ^1.2
- mobiledetect/mobiledetectlib: ^4.8
Requires (Dev)
- orchestra/testbench: ^10.0|^11.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5|^12.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-18 20:23:25 UTC
README
Agent Detection 2.0.0 identifies devices, browsers, operating systems, and crawlers from the request's User-Agent. Use its PHP API or Blade directives to tailor what your application displays.
Installation
Use PHP 8.3 or later with Laravel 13, or PHP 8.2 or later with Laravel 12. See the compatibility table for other versions.
composer require "rmunate/agent-detection:^2.0"
Quick start
use Rmunate\AgentDetection\Agent; $isMobile = Agent::isMobile(); $browserName = Agent::browser()->getName();
In a Laravel Blade view:
@agentMobile <p>Mobile view</p> @endAgentMobile
Documentation
License
This project is under the MIT License.
π Support My Projects! π
Make any contributions you see fit; the code is entirely yours. Together, we can do amazing things and improve the world of development. Your support is invaluable. β¨
If you have ideas, suggestions, or just want to collaborate, we are open to everything! Join our community and be part of our journey to success! ππ©βπ»π¨βπ»