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:
pbao9
2026-02-02 10:31:11 +07:00
parent d3b264262b
commit 17b02631e4
106 changed files with 284 additions and 259 deletions
@@ -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');
}
}