bytic / admin-base
Admin interface package for bytic framework
Requires
- php: ^8.2
- bytic/contracts: ^1.0|^2.0
- bytic/html-helpers: ^1.0.8|^2.0
- bytic/icons: ^1.0
- bytic/orm: ^0.9|^1.0|^2.0
- bytic/package-base: ^1.0|^2.0
- bytic/seo-meta: ^1.0|^2.0
- bytic/view: ^0.9|^1.0|^2.0
Requires (Dev)
- bytic/codeception: ^4.0
- bytic/mvc: ^0.9|^1.0|^2.0
- bytic/phpqatools: ^1.0
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.x-dev
- 1.0.124
- 1.0.123
- 1.0.122
- 1.0.121
- 1.0.120
- 1.0.119
- 1.0.118
- 1.0.117
- 1.0.115
- 1.0.114
- 1.0.113
- 1.0.112
- 1.0.111
- 1.0.110
- 1.0.109
- 1.0.108
- 1.0.107
- 1.0.106
- 1.0.105
- 1.0.104
- 1.0.103
- 1.0.102
- 1.0.101
- 1.0.100
- 1.0.99
- 1.0.98
- 1.0.97
- 1.0.96
- 1.0.95
- 1.0.94
- 1.0.93
- 1.0.92
- 1.0.91
- 1.0.90
- 1.0.89
- 1.0.88
- 1.0.87
- 1.0.86
- 1.0.85
- 1.0.84
- 1.0.83
- 1.0.82
- 1.0.81
- 1.0.80
- 1.0.79
- 1.0.78
- 1.0.77
- 1.0.76
- 1.0.75
- 1.0.74
- 1.0.73
- 1.0.72
- 1.0.71
- 1.0.70
- 1.0.69
- 1.0.68
- 1.0.67
- 1.0.66
- 1.0.65
- 1.0.64
- 1.0.63
- 1.0.62
- 1.0.61
- 1.0.60
- 1.0.59
- 1.0.58
- 1.0.57
- 1.0.56
- 1.0.55
- 1.0.54
- 1.0.53
- 1.0.52
- 1.0.51
- 1.0.50
- 1.0.49
- 1.0.48
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-develop
- dev-modernize-php-quality-gates
- dev-fix/card-table-dropdown-clipping
- dev-copilot/modify-data-bs-toggle-modalform
- dev-copilot/explore-codebase-auto-complete
This package is auto-updated.
Last update: 2026-10-25 20:07:23 UTC
README
Components for building admin modules
Features
Modern UI Theme
- Modern Color Palette: Professional indigo-based primary colors with complementary accents
- Enhanced Cards: Subtle shadows, smooth hover effects, and rounded corners
- Gradient Buttons: Modern button styles with gradients and smooth transitions
- Improved Forms: Better focus states with ring indicators
- Modern Tables: Hover effects and improved typography
- Enhanced Components: Modernized badges, alerts, dropdowns, modals, and pagination
Tables inside cards allow dropdown menus to extend beyond the table and card body.
An explicit overflow utility or a .table-responsive wrapper can still clip menus.
Symfony UX Turbo Integration
The package now includes Symfony UX Turbo for fast, SPA-like page navigation without the complexity of a JavaScript framework.
Features:
- Instant Navigation: Pages load without full page refreshes
- Automatic Page Updates: Leverage Turbo Streams for real-time updates
- Form Handling: Enhanced form submissions with Turbo
- Progressive Enhancement: Works with or without JavaScript
Installation
Build Assets
- Install dependencies:
yarn install
- Build for development:
yarn run dev
- Build for production:
yarn run prod
Development checks
The package supports PHP 8.2 and later. Run the test suite, PHPStan, and the PSR-12 format check locally with:
composer test
composer analyse
composer format:check
These checks also run in GitHub Actions against PHP 8.2 through 8.5.
Theme Customization
The modern theme can be customized by overriding SCSS variables in your project:
// Override modern colors $primary: #your-color; $secondary: #your-color; // Import the admin theme @import "~bytic/admin-base/resources/themes/bootstrap5/assets/sass/admin";
Color Palette
The default modern color palette includes:
- Primary: Modern indigo (#4f46e5)
- Success: Emerald green (#10b981)
- Info: Modern blue (#3b82f6)
- Warning: Amber (#f59e0b)
- Danger: Modern red (#ef4444)
Autocomplete + Create Field (Bootstrap 5)
This package includes reusable backend traits and a Bootstrap 5 field partial for "search and create if missing" flows.
1) Controller traits
Use one or both traits from:
ByTIC\AdminBase\Library\Controllers\Traits\HasAutocompleteSearchTraitByTIC\AdminBase\Library\Controllers\Traits\HasAutocompleteCreateTrait
You must implement:
autocompleteSearchFetchRecords(string $query, int $limit): iterableautocompleteCreatePersistRecord(string $name): mixed
Optional extension points:
- duplicate lookup:
autocompleteCreateFindDuplicateRecord(string $name): mixed - request parameter names (
q,limit,name) - limits, error messages, and record formatting
2) Response contract
Search success:
{
"success": true,
"data": [{"id": 1, "label": "Example"}],
"meta": {"query": "exa", "limit": 10, "count": 1}
}
Create success:
{
"success": true,
"data": {"id": 1, "label": "Example"},
"meta": {"created": true}
}
Error:
{
"success": false,
"error": {"code": "duplicate", "message": "...", "details": {}}
}
3) View partial
Use field partial:
/abstract/modules/item-form/fields/autocomplete_create
Expected variables:
- required:
field,searchUrl - optional:
createUrl,selectedId,selectedLabel,label,placeholder,minChars,limit,required,readonly
4) Frontend behavior
The Bootstrap 5 admin bundle now includes an autocomplete component that:
- debounces search requests
- renders results dropdown
- supports keyboard navigation and selection
- shows inline "create new" when no results
- creates and selects new record via AJAX
- handles Turbo navigation lifecycle cleanup
UI INSPIRATION
https://coreui.io/ https://github.com/coreui/coreui-free-bootstrap-admin-template http://admin.pixelstrap.com/endless/ltr/index.html