|
|
@ -22,6 +22,7 @@ class AreaController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
$valids = [];
|
|
|
|
$valids = [];
|
|
|
|
foreach ($area->segment as $seg) {
|
|
|
|
foreach ($area->segment as $seg) {
|
|
|
|
|
|
|
|
if (File::exists(resource_path() . '/views/segments/' . $seg)) {
|
|
|
|
$dirs = File::directories(resource_path() . '/views/segments/' . $seg);
|
|
|
|
$dirs = File::directories(resource_path() . '/views/segments/' . $seg);
|
|
|
|
foreach ($dirs as $dir) {
|
|
|
|
foreach ($dirs as $dir) {
|
|
|
|
$temp = explode('/', $dir);
|
|
|
|
$temp = explode('/', $dir);
|
|
|
@ -32,6 +33,7 @@ class AreaController extends Controller
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return view('admin.areas.area-design', compact('area', 'valids'));
|
|
|
|
return view('admin.areas.area-design', compact('area', 'valids'));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -82,11 +84,13 @@ class AreaController extends Controller
|
|
|
|
return redirect()->back()->with(['message' => __('area :NAME of website updated', ['NAME' => $area->name])]);
|
|
|
|
return redirect()->back()->with(['message' => __('area :NAME of website updated', ['NAME' => $area->name])]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function sort(Area $area){
|
|
|
|
public function sort(Area $area)
|
|
|
|
|
|
|
|
{
|
|
|
|
return view('admin.areas.area-sort', compact('area'));
|
|
|
|
return view('admin.areas.area-sort', compact('area'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function sortSave(Request $request){
|
|
|
|
public function sortSave(Request $request)
|
|
|
|
|
|
|
|
{
|
|
|
|
foreach ($request->input('items') as $key => $v) {
|
|
|
|
foreach ($request->input('items') as $key => $v) {
|
|
|
|
|
|
|
|
|
|
|
|
$p = Part::whereId($v['id'])->first();
|
|
|
|
$p = Part::whereId($v['id'])->first();
|
|
|
|