PHPackages                             langnonymous/lang - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. langnonymous/lang

ActivePackage

langnonymous/lang
=================

Simple Package Language To Laravel

1.2.02(7y ago)83.5k1MITPHPPHP &gt;= 7.0

Since Apr 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/arabnewscms/LangNonymous)[ Packagist](https://packagist.org/packages/langnonymous/lang)[ RSS](/packages/langnonymous-lang/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

Simple Translation Package
==========================

[](#simple-translation-package)

A Simple Translate To convert ui and local language. Creation and development By PhpAnonymous ( phpanonymous.com ) Laravel Version 5 and Above

\##Install with Composer

```
composer require Langnonymous/Lang
```

Provider Class
==============

[](#provider-class)

this provider is auto registred

```
  Langnonymous\Lang\Langnonymous::class,

```

\#Aliases this aliases auto registred

```
'L'         => Langnonymous\Lang\Lang::class,
```

\#publish with composer run this command `php artisan vendor:publish `

now you can check this file langnonymous.php on config path

you should add this middleware in kernel.php file

```
'Lang'     => \Langnonymous\Lang\Lang::class,

// like This
  protected $routeMiddleware = [
        'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
        'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
        'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
        'can' => \Illuminate\Auth\Middleware\Authorize::class,
        'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
        'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
        'Lang'     => \Langnonymous\Lang\Lang::class,
    ];
```

\#usage

you can use The L Class anywhere you want it , in Controller or Blade File

Now You should add this method to web.php or any route file to fire our operators

```
L::LangNonymous();
```

do you have admin panel and you want access route path to lang ? add this in route files if you want and set path like admin !!

```
L::Panel('admin');
```

now you are ready to see your route like this It is preferable to place these lines in the first line of the file

```
