Laravel 4 Aliases in custom classes
        Posted  
        
            by 
                Leonel Franchelli
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Leonel Franchelli
        
        
        
        Published on 2013-10-23T05:45:30Z
        Indexed on 
            2014/06/13
            3:26 UTC
        
        
        Read the original article
        Hit count: 231
        
i want to use the alias classes on laravel 4 "facades" like App::method , Config::method.
Well the thing is that i create a custom class and i have to import the namespaces like
<?php
namespace Face\SocialHandlers;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Config;
class FacebookHandler implements SocialHandlerInterface {
    public function registrar($perfil) {
        Config::get('facebook');
    }
}
is there any way to use those classes like in controllers or routes files of the framework ?
like
<?php
namespace Face\SocialHandlers;
//use Illuminate\Support\Facades\App;
//use Illuminate\Support\Facades\Config;
class FacebookHandler implements SocialHandlerInterface {
    public function registrar($perfil) {
        Config::get('facebook');
    }
}
Cya
ps: sry for my english
© Stack Overflow or respective owner