mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-10-21 15:03:34 -04:00
Added order and status to section manager
This commit is contained in:
@@ -41,7 +41,7 @@ class SectionController extends Controller
|
||||
|
||||
public function store(SectionRequest $request)
|
||||
{
|
||||
$section = $this->repository->create($request->title, $request->layout);
|
||||
$section = $this->repository->create($request->title, $request->layout, $request->order);
|
||||
|
||||
if ($section) {
|
||||
return response()->json([
|
||||
@@ -57,7 +57,7 @@ class SectionController extends Controller
|
||||
|
||||
public function update(SectionRequest $request)
|
||||
{
|
||||
$result = $this->repository->update($request->id, $request->title, $request->layout);
|
||||
$result = $this->repository->update($request->id, $request->title, $request->layout, $request->order);
|
||||
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
@@ -115,4 +115,13 @@ class SectionController extends Controller
|
||||
'message' => __('frontend::common.section-translations-updated'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function updateSectionStatus(Request $request, Section $section)
|
||||
{
|
||||
$this->service->updateSectionStatus($section, $request->state);
|
||||
|
||||
return response()->json([
|
||||
'message' => __('frontend::common.section-status-updated'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user