Search by

rmunate / agent-detection

rmunate

Detect devices, browsers, operating systems, and crawlers from the user agent, with Laravel Blade directives.

Package info

github.com/rmunate/AgentDetection

Documentation

pkg:composer/rmunate/agent-detection

Statistics

Installs: 837

Dependents: 0

Suggesters: 0

Stars: 61

Open Issues: 0

v2.0.0 2026-11-18 01:58 UTC

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! πŸš€

Become a Sponsor

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! πŸŒπŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»