Laravel 5 Package to Detect Users Browsers, Devices, Languages and Operating Systems

Overview

laravel-identify

Latest Stable Version License Build Status Coveralls Quality Score Total Downloads

Laravel 5 Package to identify a User's Browser, Operating System, Language and Device

Installation

PHP 7.1+ or HHVM 3.3+, and Composer are required.

To get the latest version of Laravel Identify, simply add the following line to the require block of your composer.json file.

"unicodeveloper/laravel-identify": "1.7.*"

You'll then need to run composer install or composer update to download it and have the autoloader updated.

  • If you're on Laravel 5.5 or above, that's all you need to do! Check out the usage examples below.
  • If you're on Laravel < 5.5, you'll need to register the service provider once the package is installed. Open up config/app.php and add the following to the providers array:
  • Unicodeveloper\Identify\IdentifyServiceProvider::class

Also, register the Facade like so:

'aliases' => [
    ...
    'Identify' => Unicodeveloper\Identify\Facades\IdentifyFacade::class,
    ...
]

Configuration

To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish --provider="Unicodeveloper\Identify\IdentifyServiceProvider"

Browser Detection

The browser method allows you to detect a user's browser and version.

Browsers Detected

  • Vivaldi
  • Opera
  • Opera Mini
  • WebTV
  • Internet Explorer
  • Pocket Internet Explorer
  • Microsoft Edge
  • Konqueror
  • iCab
  • OmniWeb
  • Firebird
  • Firefox
  • Iceweasel
  • Shiretoko
  • Mozilla
  • Amaya
  • Lynx
  • Safari
  • Chrome
  • Navigator
  • GoogleBot
  • Yahoo! Slurp
  • W3C Validator
  • BlackBerry
  • IceCat
  • Nokia S60 OSS Browser
  • Nokia Browser
  • MSN Browser
  • MSN Bot
  • Netscape Navigator
  • Galeon
  • NetPositive
  • Phoenix
  • SeaMonkey
  • Yandex Browser

Usage

/**
 * Gets the version of the user's browser
 * @return string
 */
Identify::browser()->getVersion()

/**
 * Gets the name of the user's browser
 * @return string
 */
Identify::browser()->getName()

OS Detection

The os method allows you to detect a user's operating system and version.

OS Detected

  • Windows
  • Windows Phone
  • OS X
  • iOS
  • Android
  • Chrome OS
  • Linux
  • SymbOS
  • Nokia
  • BlackBerry
  • FreeBSD
  • OpenBSD
  • NetBSD
  • OpenSolaris
  • SunOS
  • OS2
  • BeOS

Usage

/**
 * Gets the version of the user's Operating System
 * @return string
 */
Identify::os()->getVersion()

/**
 * Gets the name of the user's Operating System
 * @return string
 */
Identify::os()->getName()

Device Detection

The device method allows you to detect a user's device.

Device Detected

  • iPad
  • iPhone
  • Windows Phone

Usage

/**
 * Gets the name of the user's device
 * @return string
 */
Identify::device()->getName()

Language Detection

The language method allows you to detect a user's language.

Usage

/**
 * Gets the language that the user's browser contents are displayed in
 * @return string
 */
Identify::lang()->getLanguage()

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

How can I thank you?

Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!

Don't forget to follow me on twitter!

Thanks! Prosper Otemuyiwa.

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Associate users with roles and permissions
Associate users with roles and permissions

Associate users with permissions and roles Sponsor If you want to quickly add authentication and authorization to Laravel projects, feel free to check

Laravel Impersonate is a plugin that allows you to authenticate as your users.

Laravel Impersonate Laravel Impersonate makes it easy to authenticate as your users. Add a simple trait to your user model and impersonate as one of y

A simple Content Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc.

Laravel Moderation A simple Moderation System for Laravel 5.* that allows you to Approve or Reject resources like posts, comments, users, etc. Keep yo

The api help to manage wso2 users from laravel application

Laravel WSO2 Identity API User This is a Laravel library to manage WSO2 IDP users. Installation You can install the package via composer: composer req

A Laravel 5.1 ORM example with Nerds as users.

laravel-nerds A Laravel 5.1 ORM example with Nerds as users. App Features Show all Nerds Add a Nerd Edit a Nerd Delete a Nerd Keeps Nerd's Name Keeps

Durable workflow engine that allows users to write long running persistent distributed workflows in PHP powered by Laravel queues

Durable workflow engine that allows users to write long running persistent distributed workflows (orchestrations) in PHP powered by Laravel queues. Inspired by Temporal and Azure Durable Functions.

Prevent users from reusing recently used passwords

Laravel Password History Validation Prevent users from reusing recently used passwords. Installation You can install the package via composer: compose

Allow your users to login with FaceID/TouchID

Allow your users to login with FaceID/TouchID Allow your users to register physical authentication devices (FaceID or TouchID on iPhones & macs, finge

Interact with posts, terms & users in a OOP way

Installation composer require tombroucke/wp-models Interacting with models Create a new class for your custom post type namespace Otomaties\Events\Mod

Comments
  •  Fatal error: Class 'Unicodeveloper\Identify\IdentifyServiceProvider' not found

    Fatal error: Class 'Unicodeveloper\Identify\IdentifyServiceProvider' not found

    laravel v5.2.10 $ php artisan vendor:publish --provider="Unicodeveloper\Identify\IdentifyServiceProvider"

    [Symfony\Component\Debug\Exception\FatalThrowableError] Fatal error: Class 'Unicodeveloper\Identify\IdentifyServiceProvider' not found

    opened by ghost 3
  • failing to install laravel 5.1

    failing to install laravel 5.1

    Problem 1 - illuminate/support v5.2.25 requires illuminate/contracts 5.3.* -> satisfiable by illuminate/contracts[5.3.x-dev] but these conflict with your requirements or minimum-stability. - Conclusion: remove laravel/framework v5.1.35 - Conclusion: don't install laravel/framework v5.1.35 - Conclusion: don't install laravel/framework v5.1.34 - Conclusion: don't install laravel/framework v5.1.33 - Conclusion: don't install laravel/framework v5.1.32 - Conclusion: don't install laravel/framework v5.1.31 - Conclusion: don't install laravel/framework v5.1.30 - Conclusion: don't install laravel/framework v5.1.29 - Conclusion: don't install laravel/framework v5.1.28 - Conclusion: don't install laravel/framework v5.1.27 - Conclusion: don't install laravel/framework v5.1.26 - Conclusion: don't install laravel/framework v5.1.25 - Conclusion: don't install laravel/framework v5.1.24 - Conclusion: don't install laravel/framework v5.1.23 - Conclusion: don't install laravel/framework v5.1.22 - Conclusion: don't install laravel/framework v5.1.21 - Conclusion: don't install laravel/framework v5.1.20 - Conclusion: don't install laravel/framework v5.1.19 - Conclusion: don't install laravel/framework v5.1.18 - Conclusion: don't install laravel/framework v5.1.17 - Conclusion: don't install laravel/framework v5.1.16 - Conclusion: don't install laravel/framework v5.1.15 - Conclusion: don't install laravel/framework v5.1.14 - Conclusion: don't install laravel/framework v5.1.13 - Conclusion: don't install laravel/framework v5.1.12 - Conclusion: don't install laravel/framework v5.1.11 - Conclusion: don't install laravel/framework v5.1.10 - Conclusion: don't install laravel/framework v5.1.9 - Conclusion: don't install laravel/framework v5.1.8 - Conclusion: don't install laravel/framework v5.1.7 - Conclusion: don't install laravel/framework v5.1.6 - Conclusion: don't install laravel/framework v5.1.5 - Conclusion: don't install laravel/framework v5.1.4 - Conclusion: don't install laravel/framework v5.1.3 - Conclusion: don't install laravel/framework v5.1.2 - Conclusion: don't install laravel/framework v5.1.1 - unicodeveloper/laravel-identify 1.1.0 requires illuminate/support 5.2.* -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7]. - unicodeveloper/laravel-identify 1.1.1 requires illuminate/support 5.2.* -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.6, v5.2.7]. - don't install illuminate/support v5.2.0|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.19|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.21|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.24|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.26|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.27|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.28|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.31|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.6|don't install laravel/framework v5.1.0 - don't install illuminate/support v5.2.7|don't install laravel/framework v5.1.0 - Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.20, v5.1.21, v5.1.22, v5.1.23, v5.1.24, v5.1.25, v5.1.26, v5.1.27, v5.1.28, v5.1.29, v5.1.3, v5.1.30, v5.1.31, v5.1.32, v5.1.33, v5.1.34, v5.1.35, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9]. - Installation request for unicodeveloper/laravel-identify 1.1.* -> satisfiable by unicodeveloper/laravel-identify[1.1.0, 1.1.1].

    opened by josiahke 2
  • Laravel 5.5

    Laravel 5.5

    Not working with laravel 5.5....

    Problem 1 - Conclusion: remove laravel/framework v5.5.4 - Conclusion: don't install laravel/framework v5.5.4 - unicodeveloper/laravel-identify 1.1.0 requires illuminate/support 5.2.* -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7]. - unicodeveloper/laravel-identify 1.1.1 requires illuminate/support 5.2.* -> satisfiable by illuminate/support[v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7]. - don't install illuminate/support v5.2.0|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.19|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.21|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.24|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.25|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.26|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.27|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.28|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.31|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.32|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.37|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.43|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.45|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.6|don't install laravel/framework v5.5.4 - don't install illuminate/support v5.2.7|don't install laravel/framework v5.5.4 - Installation request for laravel/framework (locked at v5.5.4, required as 5.5.*) -> satisfiable by laravel/framework[v5.5.4]. - Installation request for unicodeveloper/laravel-identify ^1.1 -> satisfiable by unicodeveloper/laravel-identify[1.1.0, 1.1.1].

    Installation failed, reverting ./composer.json to its original content.

    opened by victorybiz 1
Releases(1.7.0)
Owner
Prosper Otemuyiwa
Open Source Engineer :fire: :rocket:
Prosper Otemuyiwa
Laravel Users | A Laravel Users CRUD Management Package

A Users Management Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Built for Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0 and 8.0.

Jeremy Kenedy 393 Nov 28, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
Get estimated read time of an article. Similar to medium.com's "x min read". Multilingual including right-to-left written languages. Supports JSON, Array and String output.

Read Time Calculates the read time of an article. Output string e.g: x min read or 5 minutes read. Features Multilingual translations support. Static

Waqar Ahmed 8 Dec 9, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
Laravel package for giving admin-created accounts to users via 'set-password' email.

Invytr When making a website where users are created instead of registering themselves, you are faced with the challenge of safely giving users the ac

GlaivePro 64 Jul 17, 2022
Worlds (soon to be) most advanced Anime site! Featuring Administration features and everything you need for users and yourself. The successor of aniZero.

/**********************************************************************\ | _____ H33Tx & xHENAI __ 31.01.2022| |

HENAI.eu 40 Jan 3, 2023
How to get cookies from users' browser and send the information to your email address and telegram bot

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

MAXWELL 3 Dec 3, 2022
Talk is a real-time users messaging and chatting system Laravel.

Laravel-Talk Talk is a Laravel 5 based user conversation (inbox) system with realtime messaging. You can easily integrate this package with any Larave

Nahid Bin Azhar 1.5k Dec 30, 2022
Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework.

Your users do not always report errors, LaraBug does. LaraBug is a simple to use and implement error tracker built for the Laravel framework. This rep

LaraBug 197 Dec 9, 2022
Laravel plugin to track your users logins and alert when a suspicious login occurs

Laravel Suspicious Logins Detect suspicious logins for standard Laravel authentication (base Laravel, Jetstream, etc) and notify a list of administrat

Advent Development 74 May 1, 2022