Today I will share with you how to easy using internal Library in any framework. Today we talk about Cakephp Framework.
I had taken a lot of time to find this way, and I want to sharing with you for you easy to do it, if you make that case same as me. Don’t waste the time now we are going to the topic.
As you know, each framework via CAKEPHP, LARAVEL, …. They all integrated autoload.php file, what autoload file used for? actually that file will auto load all related library from the project. So if you install any library. You should install by command: COMPOSER.
Example: I install the library SIMPLE HTML DOM PARSER from Sunra. I use below command
composer require sunra/php-simple-html-dom-parser
After install succeed, that all file library will auto mark in our projects through autoload.php file.
When you use on CAKEPHP: you just need:
While your location of library file same as:
Vendor/sunra/…
How to load internal library into Cakephp, Laravel Framework |
No need to care about how to load it.