php - Laravel 4 & Sentry 2 extending the sentry class -


having issues trying extend sentry class in sentry 2. here have done , trying do:

created new facade:

 namespace pusers;  use illuminate\support\facades\facade;  class adsentryfacade extends facade {      /**      * registered name of component.      *      * @return string      */     protected static function getfacadeaccessor()     {         return 'pusers\adsentry';     }  } 

extedned sentry class(all use namespaces there removed clean in post). there lot more trying working @ point:

 namespace pusers;  class adsentry extends \cartalyst\sentry\sentry {        public function authenticate(array $credentials, $remember = false, $aduser = false)     {                return (string)$this->throttleprovider->isenabled();     } } 

inside of app.php changed alias from:

'sentry' => 'cartalyst\sentry\facades\laravel\sentry'

to

'sentry' => 'pusers\adsentryfacade'

the problem: when use alias nothing except actual sentry class starting up. can see trying see if throttling enabled or not. using alias(always return true) doesnt use config.php file if change use normal alias works fine(returning false have set false in config).

any hints on doing wrong? couldn't find trying extend actual sentry class. thing found on sentry 2 forums 1 of admins recommended create new facade , extend sentry that's it.

any other information can provide let me know whats needed. thanks!

well figured out, got enough pointers in cartalyst channel!

i went ahead , created service provider. changed app name sentry adsentry. in facade changed 'pusers\adsentry' 'adsentry' , did trick!


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -