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:
@@ -24,13 +24,13 @@ class AddonController extends Controller
|
||||
);
|
||||
$title = 'List Add-On';
|
||||
|
||||
return view('admin.addon.index', compact('addOns', 'title'));
|
||||
return view('administrator.pages.addon.index', compact('addOns', 'title'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new addon';
|
||||
return view('admin.addon.add', compact('title'));
|
||||
return view('administrator.pages.addon.add', compact('title'));
|
||||
}
|
||||
|
||||
public function store(AddOnRequest $request)
|
||||
@@ -58,7 +58,7 @@ class AddonController extends Controller
|
||||
|
||||
$title = 'Edit Addon';
|
||||
|
||||
return view('admin.addon.edit', compact('title', 'addon'));
|
||||
return view('administrator.pages.addon.edit', compact('title', 'addon'));
|
||||
}
|
||||
public function update(int $id = 0, AddOnRequest $request)
|
||||
{
|
||||
|
||||
@@ -26,13 +26,13 @@ class CouponController extends Controller
|
||||
|
||||
$coupons = $this->discountRepository->filter($request->merge(['page' => $request->query('page') ?? 1])->all());
|
||||
|
||||
return view("admin.coupon.index", compact('title', 'coupons'));
|
||||
return view("administrator.pages.coupon.index", compact('title', 'coupons'));
|
||||
}
|
||||
public function create()
|
||||
{
|
||||
$title = "Create new Coupon";
|
||||
|
||||
return view("admin.coupon.add", compact('title'));
|
||||
return view("administrator.pages.coupon.add", compact('title'));
|
||||
}
|
||||
public function store(CouponRequest $request)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ class CouponController extends Controller
|
||||
|
||||
$title = "Edit coupon #" . $coupon->code;
|
||||
|
||||
return view("admin.coupon.edit", compact('title', 'coupon'));
|
||||
return view("administrator.pages.coupon.edit", compact('title', 'coupon'));
|
||||
}
|
||||
|
||||
public function update(int $id = 0, CouponRequest $request)
|
||||
|
||||
@@ -57,7 +57,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = 'View All Customer';
|
||||
|
||||
return view('admin.customer.index', compact('customers', 'title'));
|
||||
return view('administrator.pages.customer.index', compact('customers', 'title'));
|
||||
}
|
||||
|
||||
//Validate userid
|
||||
@@ -122,7 +122,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view("admin.customer.info", compact('customer', 'title', 'userid'));
|
||||
return view("administrator.pages.customer.info", compact('customer', 'title', 'userid'));
|
||||
}
|
||||
|
||||
protected function validateUserid()
|
||||
@@ -157,7 +157,7 @@ class CustomerController extends Controller
|
||||
}
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
return view("admin.customer.profile", compact('customer', 'title', 'userid'));
|
||||
return view("administrator.pages.customer.profile", compact('customer', 'title', 'userid'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -309,7 +309,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
return view(
|
||||
'admin.customer.product',
|
||||
'administrator.pages.customer.product',
|
||||
compact(
|
||||
'title',
|
||||
'userid',
|
||||
@@ -430,7 +430,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.domain', compact('userid', 'title', 'domains'));
|
||||
return view('administrator.pages.customer.domain', compact('userid', 'title', 'domains'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,7 +463,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.invoice', compact('userid', 'title', 'invoices'));
|
||||
return view('administrator.pages.customer.invoice', compact('userid', 'title', 'invoices'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -492,7 +492,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.transaction', compact('userid', 'title', 'transactions'));
|
||||
return view('administrator.pages.customer.transaction', compact('userid', 'title', 'transactions'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -526,7 +526,7 @@ class CustomerController extends Controller
|
||||
return view("emails.render", compact('title', 'template'));
|
||||
}
|
||||
}
|
||||
return view('admin.customer.mail', compact('userid', 'title', 'emails'));
|
||||
return view('administrator.pages.customer.mail', compact('userid', 'title', 'emails'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -552,7 +552,7 @@ class CustomerController extends Controller
|
||||
|
||||
$title = "#" . $customer->id . " " . $customer->firstname . " " . $customer->lastname;
|
||||
|
||||
return view('admin.customer.log', compact('userid', 'title', 'logs'));
|
||||
return view('administrator.pages.customer.log', compact('userid', 'title', 'logs'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -589,7 +589,7 @@ class CustomerController extends Controller
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('admin.customer.add', ['title' => 'Thêm Customer']);
|
||||
return view('administrator.pages.customer.add', ['title' => 'Thêm Customer']);
|
||||
}
|
||||
|
||||
|
||||
@@ -661,7 +661,7 @@ class CustomerController extends Controller
|
||||
return redirect()->route('customer.index')->withErrors('No data found for this user');
|
||||
}
|
||||
$title = "Add Pay for Customer";
|
||||
return view('admin.customer.addPay', compact('title', 'userid'));
|
||||
return view('administrator.pages.customer.addPay', compact('title', 'userid'));
|
||||
}
|
||||
|
||||
public function addPayStore(AddPayRequest $request)
|
||||
|
||||
@@ -26,7 +26,7 @@ class DomainController extends Controller
|
||||
['type']
|
||||
);
|
||||
$title = "List All Domain";
|
||||
return view("admin.product.domain.index",compact('domain','title'));
|
||||
return view("administrator.pages.product.domain.index", compact('domain', 'title'));
|
||||
}
|
||||
|
||||
//import domain from file excel
|
||||
|
||||
@@ -43,7 +43,7 @@ class GroupController extends Controller
|
||||
public function addGroupInformation()
|
||||
{
|
||||
$title = 'Add New Product Group';
|
||||
return view('admin.product.group', compact('title'));
|
||||
return view('administrator.pages.product.group', compact('title'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +94,7 @@ class GroupController extends Controller
|
||||
|
||||
$title = 'Action Group';
|
||||
|
||||
return view("admin.product.group", compact('title', 'type', 'group', 'group_id'));
|
||||
return view("administrator.pages.product.group", compact('title', 'type', 'group', 'group_id'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class InvoiceController extends Controller
|
||||
);
|
||||
$title = 'List all invoices';
|
||||
|
||||
return view('admin.invoice.index', compact('title', 'invoices'));
|
||||
return view('administrator.pages.invoice.index', compact('title', 'invoices'));
|
||||
}
|
||||
|
||||
public function edit(int $id = 0)
|
||||
@@ -41,7 +41,7 @@ class InvoiceController extends Controller
|
||||
|
||||
$title = "View invoice #" . $id;
|
||||
|
||||
return view("admin.invoice.edit", compact('title', 'invoice'));
|
||||
return view("administrator.pages.invoice.edit", compact('title', 'invoice'));
|
||||
}
|
||||
|
||||
public function update(InvoiceRequest $request, int $id = 0)
|
||||
@@ -94,6 +94,6 @@ class InvoiceController extends Controller
|
||||
return back()->withErrors($error->getMessage());
|
||||
}
|
||||
|
||||
return redirect()->route('admin.invoice.index')->with('success', 'Invoice deleted successfully');
|
||||
return redirect()->route('administrator.pages.invoice.index')->with('success', 'Invoice deleted successfully');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class LoginController extends Controller
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view("administrator.pages.auth.login");
|
||||
return view("administrator.pages.s.auth.login");
|
||||
}
|
||||
public function store(Request $request)
|
||||
{
|
||||
|
||||
@@ -147,7 +147,7 @@ class MainController extends Controller
|
||||
);
|
||||
$title = 'System Activity Log';
|
||||
|
||||
return view('administrator.pages.log', compact('title', 'logs'));
|
||||
return view('administrator.pages.s.log', compact('title', 'logs'));
|
||||
}
|
||||
|
||||
public function ClearCache()
|
||||
|
||||
@@ -44,7 +44,7 @@ class MenuController extends Controller
|
||||
);
|
||||
$title = 'List Menu';
|
||||
|
||||
return view('admin.menu.index', compact('menuOptions', 'title'));
|
||||
return view('administrator.pages.menu.index', compact('menuOptions', 'title'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
@@ -53,7 +53,7 @@ class MenuController extends Controller
|
||||
$menus = $this->menuRepository->getTree();
|
||||
|
||||
$parentMenuOptions = $this->buildMenuOptions($menus);
|
||||
return view('admin.menu.add', compact('title', 'parentMenuOptions'));
|
||||
return view('administrator.pages.menu.add', compact('title', 'parentMenuOptions'));
|
||||
}
|
||||
|
||||
public function store(MenuRequest $request)
|
||||
@@ -87,7 +87,7 @@ class MenuController extends Controller
|
||||
|
||||
$title = 'Edit Menu';
|
||||
|
||||
return view('admin.menu.edit', compact('title', 'menu', 'parentMenuOptions'));
|
||||
return view('administrator.pages.menu.edit', compact('title', 'menu', 'parentMenuOptions'));
|
||||
}
|
||||
|
||||
public function update(int $id = 0, MenuRequest $request)
|
||||
|
||||
@@ -31,7 +31,7 @@ class ModuleDNSController extends Controller
|
||||
]
|
||||
);
|
||||
$title = 'List all server dns';
|
||||
return view('admin.module.dns.index', compact('modules', 'title'));
|
||||
return view('administrator.pages.module.dns.index', compact('modules', 'title'));
|
||||
}
|
||||
public function import(Request $request)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ class ModuleDNSController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new server dns';
|
||||
return view('admin.module.dns.add', compact('title'));
|
||||
return view('administrator.pages.module.dns.add', compact('title'));
|
||||
}
|
||||
public function store(CreateDNSRequest $request)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ class ModuleDNSController extends Controller
|
||||
$server = $this->dnsServerRepository->find($id);
|
||||
if (! $server) return back()->withErrors('Can\'t find server by id ' . $server);
|
||||
$title = 'View server dns information';
|
||||
return view('admin.module.dns.edit', compact('title', 'server'));
|
||||
return view('administrator.pages.module.dns.edit', compact('title', 'server'));
|
||||
}
|
||||
public function update(UpdateDNSRequest $request, int $id = 0)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ class ModuleHostingController extends Controller
|
||||
]
|
||||
);
|
||||
$title = 'List all server hosting';
|
||||
return view('admin.module.hosting.index', compact('modules', 'title'));
|
||||
return view('administrator.pages.module.hosting.index', compact('modules', 'title'));
|
||||
}
|
||||
public function import(Request $request)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ class ModuleHostingController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new server hosting';
|
||||
return view('admin.module.hosting.add', compact('title'));
|
||||
return view('administrator.pages.module.hosting.add', compact('title'));
|
||||
}
|
||||
public function store(CreateHostingRequest $request)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ class ModuleHostingController extends Controller
|
||||
$server = $this->hostingServerRepository->find($id);
|
||||
if (! $server) return back()->withErrors('Can\'t find server by id ' . $id);
|
||||
$title = 'View server hosting information';
|
||||
return view('admin.module.hosting.edit', compact('title', 'server'));
|
||||
return view('administrator.pages.module.hosting.edit', compact('title', 'server'));
|
||||
}
|
||||
public function update(UpdateHostingRequest $request, int $id = 0)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ class ModuleIPPoolController extends Controller
|
||||
]
|
||||
);
|
||||
$title = 'List all server ip pool';
|
||||
return view('admin.module.ippool.index', compact('modules', 'title'));
|
||||
return view('administrator.pages.module.ippool.index', compact('modules', 'title'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
@@ -33,7 +33,7 @@ class ModuleIPPoolController extends Controller
|
||||
'page' => 1
|
||||
]
|
||||
);
|
||||
return view('admin.module.ippool.add', compact('title', 'moduleNetworks'));
|
||||
return view('administrator.pages.module.ippool.add', compact('title', 'moduleNetworks'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -61,7 +61,7 @@ class ModuleIPPoolController extends Controller
|
||||
]
|
||||
);
|
||||
$title = 'Edit server ip pool';
|
||||
return view('admin.module.ippool.edit', ['module' => $module, 'title' => $title, 'moduleNetworks' => $moduleNetworks]);
|
||||
return view('administrator.pages.module.ippool.edit', ['module' => $module, 'title' => $title, 'moduleNetworks' => $moduleNetworks]);
|
||||
}
|
||||
|
||||
public function update(Request $request, int $id = 0)
|
||||
|
||||
@@ -33,7 +33,7 @@ class ModulevCenterController extends Controller
|
||||
]
|
||||
);
|
||||
$title = 'List all vCenter';
|
||||
return view('admin.module.vcenter.index', compact('modules', 'title'));
|
||||
return view('administrator.pages.module.vcenter.index', compact('modules', 'title'));
|
||||
}
|
||||
public function import(Request $request)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ class ModulevCenterController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new vCenter';
|
||||
return view('admin.module.vcenter.add', compact('title'));
|
||||
return view('administrator.pages.module.vcenter.add', compact('title'));
|
||||
}
|
||||
public function store(CreatevCenterRequest $request)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ class ModulevCenterController extends Controller
|
||||
$server = $this->vCenterRepository->find($id);
|
||||
if (! $server) return back()->withErrors('Can\'t find server by id ' . $id);
|
||||
$title = 'View vCenter information';
|
||||
return view('admin.module.vcenter.edit', compact('title', 'server'));
|
||||
return view('administrator.pages.module.vcenter.edit', compact('title', 'server'));
|
||||
}
|
||||
public function update(UpdatevCenterRequest $request, int $id = 0)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ class OrderController extends Controller
|
||||
|
||||
$title = 'List all orders';
|
||||
|
||||
return view('admin.order.index', compact('title', 'orders'));
|
||||
return view('administrator.pages.order.index', compact('title', 'orders'));
|
||||
}
|
||||
|
||||
// Tính billing
|
||||
@@ -254,7 +254,7 @@ class OrderController extends Controller
|
||||
DB::rollBack();
|
||||
return back()->withErrors($error->getMessage());
|
||||
}
|
||||
return redirect()->route('admin.order.edit', ['id' => $order]);
|
||||
return redirect()->route('administrator.pages.order.edit', ['id' => $order]);
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ class OrderController extends Controller
|
||||
$discount = Discount::select('id', 'code', 'save', 'type')->where('status', 1)->get();
|
||||
$type = Type::select('id', 'name')->where('status', 1)->get();
|
||||
|
||||
return view('admin.order.add', compact('title', 'customer', 'payment', 'discount', 'type'));
|
||||
return view('administrator.pages.order.add', compact('title', 'customer', 'payment', 'discount', 'type'));
|
||||
}
|
||||
|
||||
public function edit(int $id = 0)
|
||||
@@ -274,7 +274,7 @@ class OrderController extends Controller
|
||||
$order = $this->orderRepository->findWithRelationships($id, ['orderItem', 'user', 'customer.invoiceItem.type', 'payment', 'discount', 'invoice.invoiceItem']);
|
||||
|
||||
if (!$order) {
|
||||
return redirect()->route('admin.order.index')->withErrors('Can\'t find a order by order id #' . $id);
|
||||
return redirect()->route('administrator.pages.order.index')->withErrors('Can\'t find a order by order id #' . $id);
|
||||
}
|
||||
|
||||
$title = 'View Manage Order';
|
||||
@@ -283,7 +283,7 @@ class OrderController extends Controller
|
||||
$item->status = $this->invoiceItemRepository->findServiceStatus($item->relid, $item->type_id);
|
||||
return $item;
|
||||
});
|
||||
return view('admin.order.edit', compact('title', 'order'));
|
||||
return view('administrator.pages.order.edit', compact('title', 'order'));
|
||||
}
|
||||
|
||||
public function update(int $id, UpdateOrderRequest $request)
|
||||
@@ -291,7 +291,7 @@ class OrderController extends Controller
|
||||
$order = $this->orderRepository->findWithRelationships($id, ['invoice', 'orderItem']);
|
||||
|
||||
if (!$order) {
|
||||
return redirect()->route('admin.order.index')->withErrors('Invalid request');
|
||||
return redirect()->route('administrator.pages.order.index')->withErrors('Invalid request');
|
||||
}
|
||||
|
||||
$status = match ($request->action) {
|
||||
|
||||
@@ -21,14 +21,14 @@ class PaymentController extends Controller
|
||||
);
|
||||
$title = 'List Payment';
|
||||
|
||||
return view('admin.payment.index', compact('payments', 'title'));
|
||||
return view('administrator.pages.payment.index', compact('payments', 'title'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new Payment Method';
|
||||
|
||||
return view('admin.payment.add', compact('title'));
|
||||
return view('administrator.pages.payment.add', compact('title'));
|
||||
}
|
||||
|
||||
public function store(PaymentRequest $request)
|
||||
@@ -55,7 +55,7 @@ class PaymentController extends Controller
|
||||
}
|
||||
$title = 'Edit Payment Method';
|
||||
|
||||
return view('admin.payment.edit', compact('title', 'payment'));
|
||||
return view('administrator.pages.payment.edit', compact('title', 'payment'));
|
||||
}
|
||||
public function update(int $id = 0, PaymentRequest $request)
|
||||
{
|
||||
|
||||
@@ -20,13 +20,13 @@ class PostController extends Controller
|
||||
$title = 'Posts';
|
||||
$posts = $this->postRepository->filter($request->merge(['page' => $request->get('page') ?? 1])->all());
|
||||
|
||||
return view('admin.post.index', compact('title', 'posts'));
|
||||
return view('administrator.pages.post.index', compact('title', 'posts'));
|
||||
}
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new Post';
|
||||
|
||||
return view('admin.post.add', compact('title'));
|
||||
return view('administrator.pages.post.add', compact('title'));
|
||||
}
|
||||
|
||||
public function store(PostRequest $request)
|
||||
@@ -59,7 +59,7 @@ class PostController extends Controller
|
||||
}
|
||||
$title = 'Edit Post';
|
||||
|
||||
return view('admin.post.edit', compact('title', 'post'));
|
||||
return view('administrator.pages.post.edit', compact('title', 'post'));
|
||||
}
|
||||
|
||||
public function update(int $id = 0,PostRequest $request)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -18,7 +18,7 @@ class RolesController extends Controller
|
||||
$roles = Role::get();
|
||||
$title = 'Administrator Role';
|
||||
|
||||
return view('admin.role.index',compact('roles','title'));
|
||||
return view('administrator.pages.role.index', compact('roles', 'title'));
|
||||
}
|
||||
public function create()
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class RolesController extends Controller
|
||||
|
||||
$title = 'Add new administrator role';
|
||||
|
||||
return view('admin.role.add',compact('permission','title'));
|
||||
return view('administrator.pages.role.add', compact('permission', 'title'));
|
||||
}
|
||||
public function store(Request $request)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ class RolesController extends Controller
|
||||
|
||||
$title = 'Edit administrator role';
|
||||
|
||||
return view('admin.role.edit',compact('permission','title','role'));
|
||||
return view('administrator.pages.role.edit', compact('permission', 'title', 'role'));
|
||||
|
||||
}
|
||||
public function update(Request $request, $id = 0)
|
||||
|
||||
@@ -23,14 +23,14 @@ class SettingController extends Controller
|
||||
{
|
||||
$title = 'General Setting';
|
||||
|
||||
return view('admin.setting', compact('title'));
|
||||
return view('administrator.pages.setting', compact('title'));
|
||||
}
|
||||
|
||||
public function smtp()
|
||||
{
|
||||
$title = 'SMTP Setting';
|
||||
|
||||
return view('admin.smtp', compact('title'));
|
||||
return view('administrator.pages.smtp', compact('title'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
|
||||
@@ -23,7 +23,7 @@ class SupportController extends Controller
|
||||
|
||||
$tickets = $this->ticketRepository->filter($request->merge(['page' => $request->get('1') ?? 1])->all());
|
||||
$title = "All Support Ticket";
|
||||
return view('admin.support.index', compact('title', 'tickets'));
|
||||
return view('administrator.pages.support.index', compact('title', 'tickets'));
|
||||
}
|
||||
|
||||
public function edit(int $ticket_num = 0)
|
||||
@@ -40,7 +40,7 @@ class SupportController extends Controller
|
||||
|
||||
$title = "Ticket #" . $ticket_num;
|
||||
|
||||
return view("admin.support.view", compact('title', 'ticket'));
|
||||
return view("administrator.pages.support.view", compact('title', 'ticket'));
|
||||
}
|
||||
|
||||
public function reply(int $id = 0, TicketReplyRequest $request)
|
||||
|
||||
@@ -155,7 +155,7 @@ class TaskController extends Controller
|
||||
}
|
||||
$title = 'View Console for VirtualMachine #' . $request->{'vmware-id'};
|
||||
|
||||
return view('admin.customer.console', compact('title', 'product'));
|
||||
return view('administrator.pages.customer.console', compact('title', 'product'));
|
||||
}
|
||||
|
||||
public function Action(Request $request)
|
||||
|
||||
@@ -17,7 +17,7 @@ class TemplateController extends Controller
|
||||
$template = Template::with('Type')->orderBy('type_id')->simplePaginate(20);
|
||||
$title = "List email template";
|
||||
|
||||
return view('admin.template.index', compact('template', 'title'));
|
||||
return view('administrator.pages.template.index', compact('template', 'title'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
@@ -26,7 +26,7 @@ class TemplateController extends Controller
|
||||
|
||||
$type = Type::select('name', 'id')->get();
|
||||
|
||||
return view('admin.template.add', compact('title', 'type'));
|
||||
return view('administrator.pages.template.add', compact('title', 'type'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -72,7 +72,7 @@ class TemplateController extends Controller
|
||||
|
||||
$type = Type::select('name', 'id')->get();
|
||||
|
||||
return view('admin.template.edit', compact('title', 'type', 'template'));
|
||||
return view('administrator.pages.template.edit', compact('title', 'type', 'template'));
|
||||
}
|
||||
public function update(Request $request)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ class UserController extends Controller
|
||||
$title = 'Administrators';
|
||||
$users = User::with('roles')->paginate(15);
|
||||
|
||||
return view('admin.user.index', compact('title', 'users'));
|
||||
return view('administrator.pages.user.index', compact('title', 'users'));
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
@@ -96,7 +96,7 @@ class UserController extends Controller
|
||||
DB::rollBack();
|
||||
return back()->withErrors($exception->getMessage());
|
||||
}
|
||||
return redirect()->route('admin.user.index')->with('success', 'New account added successfully');
|
||||
return redirect()->route('administrator.pages.user.index')->with('success', 'New account added successfully');
|
||||
}
|
||||
|
||||
public function create()
|
||||
@@ -104,7 +104,7 @@ class UserController extends Controller
|
||||
$roles = Role::select('name')->get();
|
||||
$title = "Add new Administrator";
|
||||
|
||||
return view('admin.user.add', compact('roles', 'title'));
|
||||
return view('administrator.pages.user.add', compact('roles', 'title'));
|
||||
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ class UserController extends Controller
|
||||
$roles = Role::select('name')->get();
|
||||
$title = 'Edit admin information';
|
||||
|
||||
return view('admin.user.edit', compact('user', 'title', 'roles'));
|
||||
return view('administrator.pages.user.edit', compact('user', 'title', 'roles'));
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
|
||||
@@ -29,14 +29,14 @@ class IPMapping extends Controller
|
||||
);
|
||||
$title = 'List All IP Address';
|
||||
|
||||
return view('admin.package.ipaddress.index', compact('listIP', 'title'));
|
||||
return view('administrator.pages.package.ipaddress.index', compact('listIP', 'title'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$title = 'Add new IP Address';
|
||||
|
||||
return view('admin.package.ipaddress.add', compact('title'));
|
||||
return view('administrator.pages.package.ipaddress.add', compact('title'));
|
||||
}
|
||||
|
||||
public function store(IPRequest $request)
|
||||
@@ -109,7 +109,7 @@ class IPMapping extends Controller
|
||||
|
||||
$title = "View IP Address";
|
||||
|
||||
return view('admin.package.ipaddress.edit', compact('title', 'ipaddress'));
|
||||
return view('administrator.pages.package.ipaddress.edit', compact('title', 'ipaddress'));
|
||||
}
|
||||
|
||||
public function update(int $id = 0, IPRequest $request)
|
||||
|
||||
@@ -43,7 +43,7 @@ class Network extends Controller
|
||||
{
|
||||
$title = 'Add Network';
|
||||
|
||||
return view('administrator.pages.package.network.add', compact('title'));
|
||||
return view('administrator.pages.s.package.network.add', compact('title'));
|
||||
}
|
||||
public function store(NetworkRequest $request)
|
||||
{
|
||||
|
||||
@@ -8,31 +8,31 @@ class VirtualMachineController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('admin.package.vm.index');
|
||||
return view('administrator.pages.package.vm.index');
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('admin.package.vm.add');
|
||||
return view('administrator.pages.package.vm.add');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
return view('admin.package.vm.index');
|
||||
return view('administrator.pages.package.vm.index');
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
return view('admin.package.vm.edit');
|
||||
return view('administrator.pages.package.vm.edit');
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
return view('admin.package.vm.index');
|
||||
return view('administrator.pages.package.vm.index');
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
return view('admin.package.vm.index');
|
||||
return view('administrator.pages.package.vm.index');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user