|
|
@ -281,7 +281,7 @@ class XLangController extends XController
|
|
|
|
if (!in_array($model, $this->allowedModels)) {
|
|
|
|
if (!in_array($model, $this->allowedModels)) {
|
|
|
|
return abort(404);
|
|
|
|
return abort(404);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$langs = Xlang::where('is_default', 0)->get();
|
|
|
|
// $langs = Xlang::where('is_default', 0)->get();
|
|
|
|
$model = ($model)::where('id', $id)->firstOrFail();
|
|
|
|
$model = ($model)::where('id', $id)->firstOrFail();
|
|
|
|
// $model = Product::whereId('id',$id)->first();
|
|
|
|
// $model = Product::whereId('id',$id)->first();
|
|
|
|
foreach ($request->input('data') as $lang => $items) {
|
|
|
|
foreach ($request->input('data') as $lang => $items) {
|
|
|
@ -292,6 +292,7 @@ class XLangController extends XController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$model->save();
|
|
|
|
$model->save();
|
|
|
|
return redirect()->back()->with(['message' => __('Translate updated')]);
|
|
|
|
return redirect()->back()->with(['message' => __('Translate updated')]);
|
|
|
|
|
|
|
|
|
|
|
|