vendredi 4 août 2017

'ReflectionException' Class translator does not exists

I'm trying to use localization as follow,

$types = trans('constants.type');

I have created constants.php file as follows,

/resources
    /lang
        /en
            constants.php
        /es
            constants.php

constants.php

return ['type' => 'Type'];

same way it translated in other file with same format, but this things gives me following error (i have used this in config file),

(1/1) ReflectionException Class translator does not exist

in Container.php (line 729) at ReflectionClass->__construct('translator') in Container.php (line 729) at Container->build('translator') in Container.php (line 608) at Container->resolve('translator') in Container.php (line 575) at Container->make('translator')



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vyUnBk
via IFTTT

Aucun commentaire:

Enregistrer un commentaire