How use compser in Codeigniter |
Hi
I need use some composer packages in my project Example packages : https://packagist.org/packages/firebase/php-jwt or https://packagist.org/packages/kriswallsmith/buzz I set autoloader config for composer in config.php and install these packages in vendor folder But when i use it,there are many error For example when i use php-jwt i have below error Message: Class 'Firebase\JWT\JWT' not found Guys i know that is existing jwt library for codeigniter But i like i understand how do i use package in codeigniter
How to Use Composer With Codeigniter
The easiest way to add composer into Codeigniter 3 What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-06-2019, 12:15 PM)InsiteFX Wrote: How to Use Composer With Codeigniter Thank you my friend For information,i can use pdfparser or some package in codeigniter But i cannot use jwt or some packages Do you can help me about jwt libary? It is very good if we use library from composer packages because there are validate and tested Thanks
I believe that there is a post on the forums here some place,
I' ll see if I can find it in the morning. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-06-2019, 12:39 PM)omid_student Wrote:(09-06-2019, 12:15 PM)InsiteFX Wrote: How to Use Composer With Codeigniter Example Code
Here is a better example of using it.
Composer with CodeIgniter I think the example here adding PHP Code: include_once './vendor/autoload.php'; in index.php Anyway he is showing how he used Buzz. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-07-2019, 04:07 AM)InsiteFX Wrote: Here is a better example of using it. https://github.com/bcit-ci/CodeIgniter/b...g.php#L121 He should post some code. The code could be wrong or a bug.
(09-07-2019, 07:21 AM)omid_student Wrote: My composer config is OK I need an example code like this: PHP Code: <?php
(09-07-2019, 07:47 AM)Paradinight Wrote:(09-07-2019, 07:21 AM)omid_student Wrote: My composer config is OK When i use require_once 'vendor/firebase/php-jwt/Firebase/PHP-JWT/Authentication/JWT.php'; and remove use \Firebase\JWT\JWT; That is working good Why? I used autoload already |
Welcome Guest, Not a member yet? Register Sign In |