fixed dir problem

pull/49/head
A1Gard 4 months ago
parent 4848ed87de
commit f1f8c87e39

@ -22,6 +22,7 @@ class AreaController extends Controller
$valids = [];
foreach ($area->segment as $seg) {
if (File::exists(resource_path() . '/views/segments/' . $seg)) {
$dirs = File::directories(resource_path() . '/views/segments/' . $seg);
foreach ($dirs as $dir) {
$temp = explode('/', $dir);
@ -32,6 +33,7 @@ class AreaController extends Controller
];
}
}
}
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])]);
}
public function sort(Area $area){
public function sort(Area $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) {
$p = Part::whereId($v['id'])->first();

Loading…
Cancel
Save