You can install this package via Composer by running this command: composer require arcanedev/localization
.
Or by adding the package to your composer.json
.
{
"require": {
"arcanedev/localization": "0.6.*"
}
}
Then install it via composer install
or composer update
.
Once the package is installed, you can register the service provider in config/app.php
in the providers
array:
'providers' => [
...
Arcanedev\Localization\LocalizationServiceProvider::class,
],
No need to register the Localization facade, it's done automagically.
// app/Http/Kernel.php
<?php namespace App\Http;
//...
class Kernel extends HttpKernel
{
// Localization Trait
use \Arcanedev\Localization\Traits\LocalizationKernelTrait;
// Your middleware(s) here
}
To publish the config & view files, run this command:
php artisan vendor:publish --provider="Arcanedev\Localization\LocalizationServiceProvider"