Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\ViewComposers;
use Illuminate\View\View;
class UserLanguage
{
public function __construct()
{
}
public function compose(View $view)
{
$path = base_path().DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'lang';
$langs = scandir($path);
$langs = array_diff($langs, ['.', '..']);
$languages = [];
foreach ($langs as $lang) {
$languages[$lang] = \Config::get('languages.'.$lang);
}
$view->with([
'langs' => $languages,
]);
}
}