FEATURE: Add language into widgets

This commit is contained in:
Michal Kváček
2016-07-22 15:30:03 +02:00
parent f90aee4108
commit bce98e6eaf
7 changed files with 54 additions and 3 deletions
+2
View File
@@ -4,6 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
/**
* Class WidgetArea
@@ -25,6 +26,7 @@ class WidgetArea extends Model
->where('code', $uniqueCode)
->join('widget_in_widget_area', 'widget_in_widget_area.widget_area_id', '=', 'widget_areas.id')
->join('widgets', 'widget_in_widget_area.widget_id', '=', 'widgets.id')
->where('language', LaravelLocalization::getCurrentLocale())
->orderBy('widget_in_widget_area.position');
}
}