Answer the question
In order to leave comments, you need to log in
What is the cause of error in Laravel5.2 Sleeping-owl?
When logging into the admin panel, the following error appeared:
ErrorException in FileLoader.php line 109:
Array to string conversion
(View: /vendor/sleeping-owl/admin/src/views/default/_partials/user.blade.php)
(View: /vendor/sleeping-owl/admin/src/views/default/_partials/user.blade.php)
<ul class="nav navbar-top-links navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-fw"></i> {{ Sentinel::check()->first_name ?: 'admin' }} <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="{{ route('admin.logout') }}"><i class="fa fa-sign-out fa-fw"></i> {{ trans('admin::lang.auth.logout') }}</a></li>
</ul>
</li>
</ul>
/**
* Load a locale from a given path.
*
* @param string $path
* @param string $locale
* @param string $group
* @return array
*/
protected function loadPath($path, $locale, $group)
{
if ($this->files->exists($full = "{$path}/{$locale}/{$group}.php")) {
return $this->files->getRequire($full);
}
return [];
}
<ul class="dropdown-menu dropdown-user">
<li><a href="{{ route('admin.logout') }}"><i class="fa fa-sign-out fa-fw"></i> {{ trans('admin::lang.auth.logout') }}</a></li>
</ul>
{{ trans('admin::lang.auth.logout') }}
'locale'=>['uk','en','ru'],
Answer the question
In order to leave comments, you need to log in
The reason is in the
config / app.php file.
The error pops up when there is not one language but an array
. it did not work, now I fixed everything and left it on GitHub so that there were no problems with the project when composer install
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question