đŸ“ĻInstall

How to install and use the library

What version should I install?

VersionPHP versionHow to use / install

2.8.x

>=5.0

git checkout 2.8.x include "Mobile_Detect.php"

3.74.x

=7.4,<8.0

git checkout 3.74.x include "src/MobileDetect.php"

4.8.x

>=8.0

git checkout 4.8.x composer require mobiledetect/mobiledetectlib

How do I install it in my project?

If you are using composer and it's autoload, then just install it via Composer.

composer require mobiledetect/mobiledetectlib

or manually including the library in composer.json:

{
  "require": {
      "mobiledetect/mobiledetectlib": "^4.8"
  }
}

If you want to install it manually, then it's probably better to use the branch "2.8.x" or "3.74.x".

Since "4.8.x" branch, the MobileDetect library is no longer stand-alone, it requires some extra classes for Cache and Exceptions.

Last updated