PHPackages                             rpwebdevelopment/webview-detect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rpwebdevelopment/webview-detect

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rpwebdevelopment/webview-detect
===============================

Webview detection package

1.0.2(3mo ago)0310MITPHPPHP ^8.2||^8.3||^8.4CI passing

Since Feb 20Pushed 3mo agoCompare

[ Source](https://github.com/rpwebdevelopment/webview-detect)[ Packagist](https://packagist.org/packages/rpwebdevelopment/webview-detect)[ Docs](https://github.com/rpwebdevelopment/webview-detect)[ GitHub Sponsors](https://github.com/rpwebdevelopment)[ RSS](/packages/rpwebdevelopment-webview-detect/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (24)Versions (4)Used By (0)

Laravel Webview Detect
======================

[](#laravel-webview-detect)

[![Packagist Version](https://camo.githubusercontent.com/b8a649ad9d158b88f9f0e3dfbf5aaad116d494703919366739a5e3fd368c38e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7270776562646576656c6f706d656e742f776562766965772d646574656374)](https://camo.githubusercontent.com/b8a649ad9d158b88f9f0e3dfbf5aaad116d494703919366739a5e3fd368c38e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7270776562646576656c6f706d656e742f776562766965772d646574656374)[![Packagist Downloads](https://camo.githubusercontent.com/8cc2f47b69056008144db305befce5728e921a69d1ad0893eddc663be71ab05d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7270776562646576656c6f706d656e742f776562766965772d646574656374)](https://camo.githubusercontent.com/8cc2f47b69056008144db305befce5728e921a69d1ad0893eddc663be71ab05d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7270776562646576656c6f706d656e742f776562766965772d646574656374)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4d548135d55da2597275f69b07f62544c8573fa6cde1dc54e8162f14f640683f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7270776562646576656c6f706d656e742f776562766965772d6465746563742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/rpwebdevelopment/webview-detect/actions?query=workflow%3Arun-tests+branch%3Amain)[![License: MIT](https://camo.githubusercontent.com/0d72c4cb15193b9e2e0f21dfc6ce0c8a1f49edd2719e2f9550808afd5e329576/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c756576696f6c65742e737667)](https://github.com/rpwebdevelopment/webview-detect/blob/main/LICENSE.md)

Package designed to handle parsing of User-Agent headers to determine if users are accessing applications vie WebView or not.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rpwebdevelopment/webview-detect
```

Usage
-----

[](#usage)

Basic usage is as follows:

```
use RPWebDevelopment\WebviewDetect\Facades\WebviewDetect;

$userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148';

$isWebView = WebviewDetect::forUserAgent($userAgent)->isWebView();
```

Additionally we can initialise the facade with a request for simplified handling within controller/middleware classes:

```
namespace App\Http\Middleware;

use Illuminate\Http\Request;
use RPWebDevelopment\WebviewDetect\Facades\WebviewDetect;

class FooMiddleware
{
    public function handle(Request $request, Closure $next)
    {
        $isWebview = WebviewDetect::forRequest($request)->isWebView();

        // business logic

        return $next($request);
    }
}
```

Notes
-----

[](#notes)

While efforts have been taken to make the functionality as comprehensive and reliable as possible there will undoubtedly be edge cases that have been missed (or future browsers) that are incorrectly validated. As such it is recommended to treat responses as advisory only.

Credits
-------

[](#credits)

- [Richard Porter](https://github.com/rpwebdevelopment)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance81

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Total

3

Last Release

101d ago

PHP version history (2 changes)1.0.0PHP ^8.4

1.0.2PHP ^8.2||^8.3||^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/f90bae5abe02b9035a5dec46c9e0d4d45e957eacaf740cfe79ed239e8fbeb808?d=identicon)[rpwebdevelopment](/maintainers/rpwebdevelopment)

---

Top Contributors

[![rpwebdevelopment](https://avatars.githubusercontent.com/u/15613749?v=4)](https://github.com/rpwebdevelopment "rpwebdevelopment (1 commits)")

---

Tags

laravelrpwebdevelopmentwebview-detect

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rpwebdevelopment-webview-detect/health.svg)

```
[![Health](https://phpackages.com/badges/rpwebdevelopment-webview-detect/health.svg)](https://phpackages.com/packages/rpwebdevelopment-webview-detect)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
