T
T
The Dragger2016-06-07 09:42:10
Laravel
The Dragger, 2016-06-07 09:42:10

How to properly configure mcamara/laravel-localization (Laravel5.1)?

added to app.php :

'locale' => array('ru', 'en'),
в Application Service Providers:
        Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider::class,
в самый конец в  aliases:
'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class,

in routes.php :
Route::group(
    [
        'prefix' => LaravelLocalization::setLocale(),
    ],
    function () {
        Route::get('/', '[email protected]');
    }
);

I go to the site and an error pops up:
ErrorException in LaravelLocalization.php line 117:
Illegal offset type in isset or empty

What did I do wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2016-06-07
@IPD2

Where in the manual does it say what needs to be done 'locale' => array('ru', 'en')?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question