Fixing where clause whereKey to where('key',

 in 5.4 this broke and isn't searching for the id column and not the key column.
parent 21f02473
......@@ -16,7 +16,6 @@ class EloquentTranslationRepository extends EloquentBaseRepository implements Tr
public function findByKeyAndLocale($key, $locale = null)
{
$locale = $locale ?: app()->getLocale();
$translation = $this->model->where('key', $key)->with('translations')->first();
if ($translation && $translation->hasTranslation($locale)) {
return $translation->translate($locale)->value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment