ubxty/ubx-ua-parser

Comprehensive User Agent parser for Laravel applications

Installs: 60

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/ubxty/ubx-ua-parser

v1.0.1 2025-03-17 12:02 UTC

This package is auto-updated.

Last update: 2025-12-17 13:30:52 UTC


README

A comprehensive User Agent parser for Laravel applications.

Installation

composer require ubxty/ubx-ua-parser  

Usage

use Ubxty\UAParser\Facades\UAParser;

// Get platform
$platform = UAParser::getPlatform(); // android, ios, web, etc.

// Get browser
$browser = UAParser::getBrowser(); // chrome, firefox, in-app, etc.

// Detect bots
$isBot = UAParser::isBot();

// Get original UA string
$ua = UAParser::getOriginalUserAgent();

// Get device type
$device = UAParser::getDeviceType(); // phone, tablet, desktop, etc.

Configuration

Publish the config file:

php artisan vendor:publish --provider="Ubxty\UAParser\UAParserServiceProvider" --tag="config"

Methods

  • getPlatform(): string
  • getBrowser(): string
  • isBot(): bool
  • getOriginalUserAgent(): ?string
  • getDeviceType(): string
  • getBrowserVersion(): string
  • getPlatformVersion(): string

License

MIT