How to use third party library |
Hi,
This is maybe stupid question but I have no idea how to use third party library in my project? I want to use http://mobiledetect.net/ library but I don't know where to put it and how to use it in my app? I tried to include it directly in my controlers but this is not correct way of doing it so please help with some instructions where to put such files?
From the doc first you need to download Composer which will install it.
Once Composer is installed you need to run it from a terminal in the project root. composer require mobiledetect/mobiledetectlib Once installed just follow the rest of the instructions. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-02-2020, 03:53 AM)InsiteFX Wrote: From the doc first you need to download Composer which will install it. Tnx, but I forgot to metnion that I will not install it with composer, but manualy include in my project. I need to put mobileDetect.php somwhere and somehow include it in app....
You do it like this: https://codeigniter.com/user_guide/conce...l#classmap
PHP Code: $classmap = [ Depending on your needs, we kinda have it already built in: https://codeigniter.com/user_guide/libra...l#isMobile |
Welcome Guest, Not a member yet? Register Sign In |