Find us on facebook

Apr 26, 2015

CodeIgniter - Assets


  • Place AssetLoad.php file in the folder application/libraries
  • Create folder called assets in root. (Same level as application and system folders)
  • Within assets folder, following structure should be there.

  • Within assets.ini file you can include following coding

; Asset loader manifest file

    [defaults]
      css[] = "http://127.0.0.5/CI/BATransfer/assets/css/site.css"
        css[] = "http://127.0.0.5/CI/BATransfer/assets/css/main.css"
          js[]  = "http://127.0.0.5/CI/BATransfer/assets/js/html5shiv.min.js"


          Within controller action you can use this library following way.

          $this->load->library('AssetLoad');
          $this->assetload->queue();





          Composer

          Update

          To update all packages

          php composer.phar update

          To update specific packages

          php composer.phar update laravel/framework laravelcollective/html

          To install current dependencies on composer.json(read this file and install) into vendor folder

          php composer.phar install

          Using laravelcollective/html Package in laravel 5

          Add following code to composer.json
          "require": {
          "laravelcollective/html": "5.0.*"
          },

          Install composer into project folder

          In CLI type following command and hit enter

          php composer.phar update laravelcollective/html

          In config/app.php add following

          'providers' => [
              // ...
              'Collective\Html\HtmlServiceProvider',
              // ...
            ],

          'aliases' => [
              // ...
                'Form' => 'Collective\Html\FormFacade',
                'Html' => 'Collective\Html\HtmlFacade',
              // ...
            ],