Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Latest commit

 

History

History
57 lines (39 loc) · 1.14 KB

2-Installation-and-Setup.md

File metadata and controls

57 lines (39 loc) · 1.14 KB

2. Installation

Composer

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.

Laravel

Setup

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.

Now you need to update your Http Kernel to use the Localization Router.
// app/Http/Kernel.php
<?php namespace App\Http;

//...

class Kernel extends HttpKernel
{
    // Localization Trait
    use \Arcanedev\Localization\Traits\LocalizationKernelTrait;

    // Your middleware(s) here
}

Artisan commands

To publish the config & view files, run this command:

php artisan vendor:publish --provider="Arcanedev\Localization\LocalizationServiceProvider"