Open moazamin6 opened 4 years ago
@MuhammadSaim you are write. this is great to create a helper method and call that method in views where we need $this
instance. It is very good approach where start creating new application from scratch but in existing codeigniter or any other application it is very difficult to replace $this
to getInstance()
helper method. Because I want to integrate blade template in very big codeginter application that have near about 100 view files. So it is very expensive to edit all 100 files.
So I dig into core of illuminate/view
package and make some changes.
You can install the package from composer by running the following command
composer require moazamin6/creative-blade
you can also find that package on following link
GitHub: https://github.com/moazamin6/creative-blade Packagist: https://packagist.org/packages/moazamin6/creative-blade
Thanks
I also faced this issue @moazamin6 so i just did a trick just make a helper function which returns the $CI object
and you can use this like