Created
April 14, 2017 09:44
-
-
Save keevitaja/f96437d5a56dc7d39db0d3298badd366 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Keevitaja\TestModule; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Translation\Translator; | |
class LoadTranslations | |
{ | |
protected $trans; | |
public function __construct(Translator $trans) | |
{ | |
$this->trans = $trans; | |
} | |
public function handle(Request $request, Closure $next) | |
{ | |
$this->trans->addLines([ | |
'message.logged_out' => 'testing' | |
], 'en', 'anomaly.module.users'); | |
dd($this->trans->trans('anomaly.module.users::message.logged_out')); | |
return $next($request); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment