php - Cant get Laravel 4 to work - Getting Class not found error -


ok, trying create working facade resizer bundle laravel 3 (https://github.com/maikeldaloo/resizer).

so far have:

  • created "resizer.php" file code reszier bundle , added namespace barthompson\planesaleing;
  • created "resizerfacade.php" contents of contained @ bottom of post;
  • created "resizerserviceprovider.php", contents of contained @ bottom of post;
  • these 3 files saved in: app\library\;
  • added autoloader \app\config\app.php under 'providers' => array reads:

    'barthompson\planesaleing\resizerserviceprovider',

  • added alias \app\config\app.php under 'aliases' => array reads:

    'resizer' => 'barthompson\planesaleing\resizer',

  • added following directory autoload classmap in composer.json:

    "app/library"

however, can load website successfully, when call resizer::open, following error:

class 'barthompson\planesaleing\config' not found  

i getting confused namespaces. havent used them anywhere else in app, followed tutorial used them (http://fideloper.com/create-facade-laravel-4) have used them in implementation without fulling understanding them.

can explain going wrong?

resizerfacade.php:

<?php  namespace barthompson\planesaleing\facades;  use illuminate\support\facades\facade;  class resizer extends facade {      /**      * registered name of component.      *      * @return string      */     protected static function getfacadeaccessor() { return 'resizer'; }  } 

resizerserviceprovicer.php:

<?php  namespace barthompson\planesaleing;  use illuminate\support\serviceprovider;  class resizerserviceprovider extends serviceprovider {      /**      * register service provider.      *      * @return void      */     public function register()     {         // register 'resizer' instance container our underlyingclass object         $this->app['resizer'] = $this->app->share(function($app)         {             return new barthompson\planesaleing\resizer;         });     } } 


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -