public static function getTranslator()
    {
        $translator = app('translator');

        app()->singleton('crestapps_translator', function ($app) use ($translator) {
            $trans = new CrestAppsTranslator($translator->getLoader(), $translator->getLocale());

            $trans->setFallback($translator->getFallback());

            return $trans;
        });

        return app('crestapps_translator');
    }
public static function getTranslator()
    {
        $translator = app('translator');

        app()->singleton('crestapps_translator', function ($app) use ($translator) {
            $trans = new CrestAppsTranslator($translator->getLoader(), $translator->getLocale());

            $trans->setFallback($translator->getFallback());

            return $trans;
        });

        return app('crestapps_translator');
    }
public static function getTranslator ( ) { $ translator = app ( 'translator' ) ; app ( ) -> singleton ( 'crestapps_translator' , function ( $ app ) use ( $ translator ) { $ trans = new CrestAppsTranslator ( $ translator -> getLoader ( ) , $ translator -> getLocale ( ) ) ; $ trans -> setFallback ( $ translator -> getFallback ( ) ) ; return $ trans ; } ) ; return app ( 'crestapps_translator' ) ; }
Adds a new instance of crestapps_translator to the IoC container,

@return CrestApps\CodeGenerator\Support\CrestAppsTranslator
Adds a new instance of crestapps_translator to the IoC container