Answer the question
In order to leave comments, you need to log in
Language strings not working in laravel 5?
This is my controller :
<?php namespace App\Http\Controllers\admin;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Lang;
class UserController extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
App::setLocale('ru');
$lang = Lang::get('messages.userlist');
dd($lang);
$user = User::all();
return view ('admin.UserView', ['user'=>$user]);
}
}
<?php
return [
'userlist' => 'Имя пользователя и пароль не совпадают.',
];
Answer the question
In order to leave comments, you need to log in
But at the output I get the following phrase "messages.userlist"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question