php - Laravel authentication bundle -


i'm pretty new laravel, i've spent time reading , doing tutorials. lately, i've been following tutorial creating authentication bundle:

http://net.tutsplus.com/tutorials/php/build-your-first-admin-bundle-for-laravel/

basically, it's creating simple custom auth driver extending default auth one. works quite nicely.. inside bundle. problem more how use/access admin/login bundle in main application. feel bit ashamed asking this, guess has loading/starting admin bundle in application controller(s), can't work.

thank you

you have couple of options, can either start bundle manually within application controllers each time calling:

bundle::start("<your bundle name>"); 

or when register bundle laravel (when add /application/bundles.php) can choose autoload it:

return array(     // ... other bundles     "<your bundle name>" => array("auto" => true), ); 

from looking @ tutorial might like:

'admin' => array('handles' => 'admin', 'auto' => true) 

once have either started bundle manually, or autoloaded it, can call bundle classes directly (make sure use proper namespace when calling class).

you can check out laravel's documentation.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -