Skip to content

Refactor backend views to use Livewire and Cube components - #63

Merged
nasirkhan merged 26 commits into
mainfrom
dev
Sep 18, 2026
Merged

nasirkhan merged 26 commits into
mainfrom
dev

Conversation

@nasirkhan

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and refactors across the Category and Backup modules, as well as some dependency updates. The most notable changes are the migration to new base classes and traits from the nasirkhan/laravel-admin package, UI modernization of the backup view, and the addition of a Livewire-powered categories index. There are also some dependency cleanups and deprecations.

Dependency and Base Class Refactoring:

  • Added nasirkhan/laravel-admin as a dependency and removed yajra/laravel-datatables-oracle from composer.json, reflecting a shift to new admin components and removing unused packages.
  • Updated controllers in the Category and Backup modules to use Nasirkhan\Admin\Http\Controllers\BackendBaseController and Nasirkhan\Admin\Traits\Authorizable, replacing previous base classes and traits. [1] [2] [3]
  • Added a deprecated alias for BackendBaseController to ease transition to the new base controller.

UI and Blade Template Updates:

  • Modernized the backup management view by replacing custom Blade components with cube-prefixed components, improving accessibility and styling, and removing DataTables dependency.

Category Module Enhancements:

  • Added a Livewire-powered CategoriesIndex component for backend category listing and registered it in the service provider. [1] [2] [3]
  • Implemented a new index method in the backend categories controller for paginated category listing.
  • Updated the frontend category show method to support slugs and eager-load posts with related data. [1] [2]

Other Cleanups:

  • Removed the publishing of the DataTables config file in the service provider, aligning with the removal of the DataTables package.

These changes collectively modernize the codebase, improve maintainability, and enhance the user experience in the admin interface.

nasirkhan and others added 26 commits September 2, 2026 23:58
…d categories

- Updated `index_datatable.blade.php` for posts and tags to replace DataTables with Livewire components.
- Removed DataTables configuration and scripts from the views.
- Created Livewire components `PostsIndex`, `TagsIndex`, and `CategoriesIndex` for handling data display and search functionality.
- Updated form stubs to use Tailwind CSS for styling and improved accessibility.
- Removed obsolete DataTables configuration file.
- Adjusted routes to eliminate unnecessary index_list and index_data routes.
…ling

- Updated menu, post, tag, and settings index views to utilize new cube components for breadcrumbs and section headers.
- Enhanced table styling for better responsiveness and visual consistency.
- Replaced legacy Bootstrap classes with Tailwind CSS for form fields and buttons in settings views.
- Improved error handling and validation feedback for form fields across settings.
- Refactored checkbox, email, number, radio, select, text, and textarea fields to align with new design standards.
…pdate routes, and implement BackendBaseController for common functionality

- Deleted index_datatable.blade.php files for Menu, Post, and Tag modules to streamline the view structure.
- Updated web.php routes for Menu, Post, and Tag modules to remove unnecessary index_list and index_data routes.
- Refactored PostsController and TagsController to utilize BackendBaseController for common CRUD operations and context management.
- Added BackendBaseController to handle shared logic for module management, including index, create, store, show, edit, update, destroy, trashed, and restore methods.
- Removed inline scripts for TomSelect in Post form view to clean up the codebase.
…stency and maintainability

- Updated the post form to replace traditional HTML form elements with Cube components, enhancing the UI and UX.
- Refactored the tag form similarly, ensuring a consistent approach across both forms.
- Improved accessibility and responsiveness by utilizing grid layouts and Cube's input components.
- Removed legacy PHP code in favor of Blade components for better readability and maintainability.
- Updated menu item component styles to include font weight for better visibility.
- Improved navigation item styles for consistency with menu items.
- Refactored error and info messages in the menu item component for better UX.
- Reorganized form sections in the menu item component for clarity and usability.
- Introduced new language keys for menu item management.
- Updated post form to fetch active categories and tags directly, ensuring data integrity.
…space

chore: add nasirkhan/laravel-admin dependency to composer.json
@nasirkhan
nasirkhan merged commit 254a537 into main Sep 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant