Refactor views to use new layout structure and update routes for administrator pages
- Changed view extends from "admin.main" to "administrator.layout.master" across multiple files. - Updated route names in admin.php and administrator.php to reflect new structure for user, order, invoice, and other management functionalities. - Adjusted view includes to point to the new directory structure for blocks and components. - Ensured all permission checks remain intact while refactoring the views.
This commit is contained in:
@@ -44,7 +44,7 @@ class ProductController extends Controller
|
||||
|
||||
$title = "List All Product";
|
||||
|
||||
return view('admin.product.index', compact('title', 'groups'));
|
||||
return view('administrator.pages.product.index', compact('title', 'groups'));
|
||||
}
|
||||
|
||||
public function create(Request $request)
|
||||
@@ -54,7 +54,7 @@ class ProductController extends Controller
|
||||
$group = $this->groupRepository->getAll();
|
||||
$type = $this->typeRepository->getAll();
|
||||
if ($step === 1) {
|
||||
return view("admin.product.first", compact('group', 'type', 'title'));
|
||||
return view("administrator.pages.product.first", compact('group', 'type', 'title'));
|
||||
}
|
||||
|
||||
$validator = Validator::make($request->except('_token'), [
|
||||
@@ -72,10 +72,10 @@ class ProductController extends Controller
|
||||
$view = null;
|
||||
|
||||
$view = match ((int) $type_id) {
|
||||
1 => "admin.product.addon",
|
||||
2 => "admin.product.domain.add",
|
||||
3 => "admin.product.hosting",
|
||||
4 => "admin.product.vps"
|
||||
1 => "administrator.pages.product.addon",
|
||||
2 => "administrator.pages.product.domain.add",
|
||||
3 => "administrator.pages.product.hosting",
|
||||
4 => "administrator.pages.product.vps"
|
||||
};
|
||||
|
||||
// Thêm dữ liệu OS cho VPS
|
||||
@@ -189,10 +189,10 @@ class ProductController extends Controller
|
||||
$group = $this->groupRepository->getAll();
|
||||
$type = $this->typeRepository->getAll();
|
||||
$view = match ((int) $type_id) {
|
||||
1 => "admin.product.addon",
|
||||
2 => "admin.product.domain.add",
|
||||
3 => "admin.product.hosting",
|
||||
4 => "admin.product.vps"
|
||||
1 => "administrator.pages.product.addon",
|
||||
2 => "administrator.pages.product.domain.add",
|
||||
3 => "administrator.pages.product.hosting",
|
||||
4 => "administrator.pages.product.vps"
|
||||
};
|
||||
$repository = match ((int) $type_id) {
|
||||
1 => $this->addonRepository,
|
||||
|
||||
Reference in New Issue
Block a user