Bays - Easy "widgets" for your views |
(06-01-2015, 05:53 AM)frocco Wrote: How do I install this? Tried composer install and nothing happened. At the command line, in the project root where your composer.json file is (per packagist.org): Code: composer require 'myth/bay:1.0-beta1' // or This will install it to your project. Then make sure that CodeIgniter is setup to use Composer's autoloader by editing config/config.php: Code: $config['composer_autoload'] = 'vendor/autoload.php; Then you need some way to instantiate the class and make it available to your views. For almost all of my projects, I have some form of setVar() method that allows me to collect data to be passed to the view, but you could do it within a standard $data array, also. Something like this in your controller's method: Code: $data['bay'] = new \Myth\Bay\Bay( new Myth\Bay\CI3Finder() ); At this point, $bay is available in your views for you to use however you would like. See the Readme for more information. |
Messages In This Thread |
Bays - Easy "widgets" for your views - by kilishan - 05-27-2015, 10:12 PM
RE: Bays - Easy "widgets" for your views - by frocco - 06-01-2015, 05:53 AM
RE: Bays - Easy "widgets" for your views - by kilishan - 06-01-2015, 06:56 AM
RE: Bays - Easy "widgets" for your views - by frocco - 06-01-2015, 09:59 AM
RE: Bays - Easy "widgets" for your views - by Kulavert - 10-15-2015, 11:32 AM
RE: Bays - Easy "widgets" for your views - by mwhitney - 10-16-2015, 09:51 AM
RE: Bays - Easy "widgets" for your views - by ignitedcms - 10-15-2015, 11:48 AM
RE: Bays - Easy "widgets" for your views - by kilishan - 10-16-2015, 08:45 PM
RE: Bays - Easy "widgets" for your views - by kenjis - 01-13-2016, 07:24 PM
RE: Bays - Easy "widgets" for your views - by kilishan - 01-13-2016, 08:45 PM
RE: Bays - Easy "widgets" for your views - by kenjis - 01-14-2016, 06:10 PM
|