Upgrade commands
- The
admin:upgradecommand and its steps (admin:upgrade:config,:settings,:icons,:navigation,:dates) rewrite source files. The last step,admin:upgrade:cache, only reports closures in config files andenv()outside them, which have to be changed by hand; it fails while any is left. Run them in a local working tree and commit the result; in theproductionenvironment they refuse to run unless--forceis passed.admin:upgrade --forceforwards the option to every step.
Modals and toasts moved to @crudadmin/helpers
- Removed
useModalStore(also fromwindow) and the component methodsthis.openModal(),this.successModal(),this.errorModal(),this.warningModal()andcloseModal(). UseModalandToastfrom@crudadmin/helpers/modal, available aswindow.Modalandwindow.Toastin custom components. openModal({ toast: true })no longer exists. Modals do not open toasts; useToast.success(),Toast.error(),Toast.warning()orToast.open().
- The
closecallback of a modal is nowcancel. It runs from the close button, the X button and Escape. Returningfalsefromsuccess,cancelor an action still keeps the modal opened. - Modal objects changed shape:
modal.title,modal.messageandmodal.typeare inmodal.message.title,modal.message.textandmodal.message.type;modal.visibleandmodal.openedAtare inmodal.state;modal.classandmodal.keyare inmodal.options; component props are inmodal.props.modal.idstays. - Components opened in a modal receive the modal in the
modalprop, the separateactionsprop is no longer passed; readmodal.actions. - Modal options are read from one place: the options of the opening are merged with the options of the wrapper component, whose values win. Only the
classof both is kept together. - Renamed modal options:
escClosebecamedismissible(Escape closes a modal with no closing action) and hiding the footer isfooter: falseinstead ofactions: false. The old names keep working. - The form of a model opened in a modal (a row of the table, a relation opened from a select field) is no longer a Bootstrap modal. It is an entry of the same manager as every other modal, drawn in a
.row-action-modalwrapper; the#modal-inline-…element, its Bootstrap instance and the.modal-backdropare gone. - The
RowActionModalcomponent is not registered globally any more and is not placed in a template. The form of a model is opened on the model itself:model.modals.add(),edit(id),view(id),list(),form()andclose(). A model which opens its own form in a modal (a relation, a sub model) turns it on withmodel.modals.enable();form.modalin the settings still does it on its own. - Removed the
setBootstrapModalZIndexes()helper. Modals are stacked in the order they were opened. - The listing button of a relation select is marked with
data-list-relation-rowinstead of a seconddata-add-relation-row; update selectors of custom tests. - Rows requested before their table is drawn now use the default page size instead of asking for no rows. A relation listing opened from a select field used to open empty.
- The page behind an opened modal no longer scrolls. The administration sets the
--modal-openclass on<html>; custom styles that scrolled the page while a modal was open have to account for it.
Model settings editor
- UI settings can now be stored in the
modelssection ofbootstrap/admin.php, keyed by the model class basename; commit and deploy this file. Existing$settings,settings()and mutators remain supported, with its overrides applied last. - Use column snapshots instead of new
columns.*.before/columns.*.afterdeclarations on field columns. A virtual column still needsbefore/after, it has no field to anchor it. Runadmin:upgrade:settings --dry-run, thenadmin:upgrade:settingsto move supported literals and convert the ordering. Resolve reported dynamic expressions manually. - Explicit column visibility overrides can reveal
hiddenfields; snapshots retain shared visibility and order, while personal preferences remain above them. Password and inaccessible columns remain excluded. - The table heading
title.rowsis an editor setting too, next totitle.createandtitle.update:admin:upgrade:settingsmoves it into the file and the heading of the table has its own pencil. columns.*.namenow takes precedence over a field’scolumn_name, so editor changes also apply to fields with a custom column label.- Editing requires full superadmin access,
APP_DEBUG=trueand a non-production environment. Production uses the deployed file without exposing the editor. - The editor mode is the separate development package
crudadmin/admin-editor: runcomposer require --dev crudadmin/admin-editor. Without it the administration has no editor mode, no pencils and no settings endpoints;bootstrap/admin.phpis still read.config('admin_editor.enabled') = falseturns it off in a project that has it installed. - The endpoints
GET|PUT /admin/api/models/{table}/settings(route namesadmin.models.settings.*) andAdmin\Controllers\Dev\ModelSettingsControllermoved into the package, the controller isAdminEditor\Controllers\ModelSettingsControllerand its gateAdminEditor\Editor::available(). - The frontend of the editor is built by the package itself (
dist/admin-editor.js, published topublic/vendor/crudadmin-admin-editorbyphp artisan admin:update); the resources build carries no editor code. The administration renders what the package registers into named places (EditorSlot,useEditorExtensions()), custom components read the switch withuseEditorMode().isActive()instead ofuseEditorModeStore().useModelApi().settings()andupdateSettings()were removed. - Packages building their own scripts for the administration import its API as
@crudadmin/admin, mapped ontowindow.crudadmin.admin(useSettingStore,useModelStore,useTableStore,useHeaderStore,useAuthStore,useAxios,useApiUrl,useGenerateUuid,useEditorExtensions,useEditorMode,Modal,Toast);vue,pinia,vuedraggableandlodashare the existing globals.crudadmin/skeletoncarries the build setup.
Renamed and removed model settings
admin:upgrade:settings rewrites these in models under app/ and reports what it cannot convert. Settings of packages and of dynamic settings() methods have to be changed by hand.
Renamed:
title.insert→title.createandtitle.edit→title.update. Both were aliases with their own precedence rules; declare one heading per form. A model declaring the alias next to its target is reported and left unchanged.title.tab→tabs.name,form.tabs→tabs.enabled,tabs_autoload→tabs.autoload. Every tab setting lives undertabs.*now. Write'tabs.enabled' => false, not'tabs' => false, so the key stays usable next totabs.default.sortable→table.sortable. The$sortablemodel property (drag and drop of rows) is not affected, the setting only turns off sorting by clicking column headers.- Every setting now lives under the area it affects, and its name says what it controls instead of naming an action or a database term. The migrator moves all of them.
table.actionsandlayout.headerare the counterparts ofform.actionsandform.header, which is what the oldactionsandheadernames hid.layout.*holds the settings of the area around the table and the form:layout.headeris the bar with the grid switcher, search and add button,layout.split_viewkeeps the table next to the form in the full grid.editablemoved toform.editableand keeps its polarity, it is not inverted into areadonlykey. It still only changes the browser; forbid updates with the$editableproperty.- A switch of a whole area is its
enabledkey:table→table.enabled,form→form.enabled,search→search.enabled,pagination→pagination.enabled,filter→filter.enabled,form.modal→form.modal.enabled. The bare boolean keeps working, the migrator only normalizes it; a declaration of the same name holding an array is the group itself and is left alone. - The settings payload of the Vue app is the nested form of these keys, so custom components read
settings.table.incrementswhere they readsettings.increments, andsettings.layout.split_viewinstead ofsettings.table.splitmode.
orderBy. Use the$orderBymodel property, which orders the query and the table at once.rows.eachRequestInitial. Only the first rows request of a model is initial again, so field options andgetAdminModelInitialData()are no longer rebuilt on every refresh of a model that declared it.columns.*.invisibleandcolumns.*.column_visible. Usecolumns.*.hidden; a virtual column declared withinvisiblewas hidden and is now visible unlesshiddenis set.
grids→grid.sizes, andgridas a list of sizes,grid.enabled,grid.disabledandgrid.{size}.enabled/.disabledare all replaced by that one list. The switcher hides itself when one size is left, so'grid.enabled' => falsebecomes'grid.sizes' => ['<the size you keep>']. Declarations which only repeat the default ('grid.enabled' => true,'grid.full.enabled' => true) are removed. Column widths of CrudAdmin 5 (4,8,6,0) becomesmall,big,halfandfull; any other number was ignored by CrudAdmin 5 and is removed.- The migrator computes the list from the old keys. It reports a dynamic grid value, a switcher turned off without
grid.default, and old keys declared next to a size list. grid.defaultstays and keeps its second effect: a form of 20 or more fields opens in the full grid unless the model declaresgrid.defaultorgrid.sizes.
Rows response buttons
The rows endpoint (/admin/api/models/{table}/rows) and the insert response no longer repeat every button under each row. buttons_definitions carries each button once, keyed the same way as before, and buttons.{id} holds per row only the properties in which that row’s button differs (a name or class computed from the row). Custom JavaScript reading response.buttons has to merge the two; the admin app does it in setRowsData() and addCreatedRows(), so code working with model.getRowsData().buttons or getButtonsForRow() is unchanged.
Default module icons and form texts
- Known table names supply many more default sidebar icons (warehouses, stock, prices, branches, workers, courses, questions, notifications and others). A module without an icon that showed none can now show one; declare the
iconsetting when the module has to keep its own. - Tables ending with
forms,inquiries,submissionsandapplicationsusedfa-wpforms, a brand icon the administration does not bundle, so nothing rendered. They now usefar fa-list-alt. - Default titles and buttons are merged key by key. Models of the
time,appointment,booking,lectorandtrainingtable names that declared only some oftitle.create,title.updateorbuttons.createused to lose the remaining defaults; those are applied now. Declare the setting explicitly to keep a different text.
Removed field types
type:array
- Removed
type:array; replace it withtype:jsonin field definitions. - Values are now automatically decoded into PHP arrays instead of returned as raw JSON strings. Review manual
json_decode()/json_encode()calls and custom casts. type:jsonis hidden from admin table rows by default, which may affect custom table components.- Invalid JSON strings in admin requests are decoded to
null; review validation if malformed input must be rejected. - The database column remains JSON; existing data does not need conversion solely for this replacement.
- The
arrayvalidation rule andmultipleparameter remain supported.
type:boolean
- Removed
type:boolean; replace it withtype:checkboxin field definitions, including array notation. - The database column remains boolean (
tinyint(1)on MySQL); existing 0/1 data does not need conversion solely for this replacement. - Model and API values are cast to
false/trueinstead of integers. Review strict comparisons such as=== 1and consumers expecting numeric values. - Checkbox adds a form input and boolean validation. A missing checkbox in an admin request normally becomes
false; review partial updates. - The
booleanvalidation rule remains supported.
Removed commands
admin:queue
- Removed
admin:queue; remove its calls from cron and the Laravel scheduler. - Run Laravel’s
php artisan queue:workwith a process manager such as Supervisor instead. Otherwise jobs may remain unprocessed after the upgrade. - Move any custom
queue.admin.cli,queue.admin.log_path,queue.admin.timeout,queue.admin.sleepandqueue.admin.triessettings to the worker command and process manager configuration; CrudAdmin no longer reads them.
Configuration changes
Config keys grouped
- Run
php artisan admin:upgrade:config --dry-runand thenphp artisan admin:upgrade:configto rewriteconfig/admin.php. The command moves the declarations with their comments and reports what it cannot convert. Keys of packages and configs built at runtime have to be changed by hand. - Prefixed keys moved under the group they belong to, and switches which had companion keys became a group with an
enabledkey.
image_rewrite_missing_uploadsandrewrite_missing_upload_imageswere two keys for one behaviour, as wereadmin_groupsandadmin_roles. Keep one of each pair; the migrator reports a project declaring both with different values and leaves them for you to resolve.admin.frontend_editorwas truthy whenever thecrudadmin/websitepackage was installed, because its default is an array. It is read asfrontend_editor.enablednow, so images of a project with the editor disabled are no longer routed through the editor.- Deleted keys which no longer did anything:
sitebuilder(the module was removed) andimage_compression_quality(unread since v5, useimages.lossy_quality). The migrator deletes them; their values are not moved, because a key that did nothing must not start applying. groupsmoved into the navigation section ofbootstrap/admin.php, see Menu in the navigation section.name,locale,license_key,models,modules,components,app_namespace,resources_provider,custom_rules,global_rules,filemanager,apiandsitetreeare unchanged.- Packages merging their defaults into
config('admin')merge them key by key inside a group now, so a project value no longer replaces the whole group of the package. Values of the project stay in front of the values a package appends, across any number of packages. - A package still merging an old key has it mapped onto the new one and logged as a warning instead of throwing, because the project can not migrate a package. Migrate the config of your own packages with
admin:upgrade:config --path=src/Config/admin.php.
File browser configuration
- Removed the
ckfinderboolean and booleanfilemanagersettings; usefilemanager.type(none,lfmorckfinder). CKFinder itself remains supported. - Replace
'ckfinder' => truewith'filemanager' => ['type' => 'ckfinder']; keeplicense_nameandlicense_keyinside that array. - Replace
'filemanager' => truewith'filemanager' => ['type' => 'lfm']; use['type' => 'none']to disable the browser. - Old boolean settings no longer enable a file browser. Update project configuration before upgrading.
Legacy file configuration
- Removed the unused
fileconfig section (exists_cache,exists_cache_days,redirect_after_resize). Remove it from project configuration if present. - These keys already had no effect in v5; file uploads and image resizing are unchanged.
- Use
images.resizer.storage_cache,images.resizer.storage_cache_daysandimages.resizer.redirect_after_resizeto configure the corresponding behavior.
Config cache
php artisan optimizeandconfig:cacheare supported and belong at the end of the deploy script. Earlier versions were deployed without them.- Config files no longer support closures (
function () {},fn () =>),config:cachefails on them. Replace each with a[Class::class, 'method']callable of a static method (appearance.logo,admin_helpers.auth.otp.user, groups merged by packages as[[Class::class, 'method']]). env()can be called only in config files. Code which calledenv()anywhere else in the project (controllers, models, helpers, routes, blade views,bootstrap/) getsnullwith a cached config: move each value into a config file (config/services.phpor a config file of the project) and read it withconfig().php artisan admin:upgrade:cachelists every closure in the config files and everyenv(),getenv(),$_ENVandEnv::get()call outside them, with files and lines.route:cachecaches also the routes oflocalizedRoutes(), see Localized routes. Routes marked with->visible()are kept in the route action, so the frontend editor finds them also in cached routes.- Packages read their environment values through config keys, the variables stay the same:
crudadmin/helpers(admin_helpers.auth.verificator,admin_helpers.bundle.*,admin_helpers.smartsms),crudadmin/payments(admin_payments.store_debug,admin_payments.paypal.webhook_id,admin_payments.gopay.*),crudadmin/socialite(admin_socialite.paypal_mode,admin_socialite.instagram_secret),crudadmin/invoices(invoices.xz_path,invoices.omega.*) andcrudadmin/eshop(admin_eshop.nuxt.*,admin_eshop.store_debug,admin_eshop.delivery.shipping.*,admin_eshop.attributes.ids.*,admin_eshop.payment_methods.cash_on_delivery.*,admin_eshop.reports.archive; see itsMIGRATION-5.0.md). The new keys are merged from the package also into a published config file of the project. crudadmin/gutenbergpublishes its assets with theadmin.resourcestag ofadmin:update;'gutenberg' => trueis no longer needed for that.- The file manager
lfm.private_folder_nameis a handler class instead of a closure; a project config which overrides it with a closure has to use a class with auserField()method. - New config keys read from the same environment variables as before:
admin.storage.clean_items_limit(STORAGE_CLEAN_ITEMS_LIMIT),admin.sitetree_editor(ADMIN_SITETREE_EDITOR) andadmin.frontend_editor.url(APP_NUXT_URLorWEB_URL) ofcrudadmin/website.
Cache of serialized models
- Laravel 13 sets
cache.serializable_classestofalsein a newconfig/cache.php: objects come back from the cache store as__PHP_Incomplete_Class. CrudAdmin caches models and collections (runCached(),Admin::cache()with a store, bootstrap sections, invoice settings), every request reading one fails. Set'serializable_classes' => trueinconfig/cache.php(or a list of the cached model classes). Projects upgraded from Laravel 12 have no such key and keep the old behaviour.
Package service provider
- Packages extend
Admin\Providers\AdminPackageServiceProviderand declare their config, admin config, routes, models ($modelsormodels()), listeners, commands, field mutations, views, assets and publishable files in properties, see Package service provider. The base provider skips config merging with a cached config and route files with cached routes. - Removed
Admin\Providers\AdminHelperServiceProvider. ExtendAdminPackageServiceProvider, it has the same helper methods (mergeAdminConfigs(),mergeConfigs(),pushComponentsPaths(),registerFacades(),registerProviders(),bootRouteMiddleware()), and move the work ofregister()/boot()into its properties. A subclass which keeps its ownregister()orboot()callsparent::register()/parent::boot(). - All CrudAdmin packages have a single provider now. Their separate config, route and event providers were removed; they extended Laravel’s
RouteServiceProviderandEventServiceProvider, which with the Laravel 11 skeleton loaded the routes of the application once more per package and added the email verification listener ofRegisteredonce per package. Projects which referenced such a provider of a package (e.g.AdminEshop\Providers\RouteServiceProvider) remove the reference. - Built assets of a package are declared in
$assets(source => directory inpublic/).admin:updatepublishes them with theadmin.resourcestag and crudadmin adds their directories into the project.gitignore; theOnAdminUpdateListenerclasses of the packages were removed. - Package configs merged by
$configkeep the values of the project and add missing keys, a list of the project replaces the list of the package (e.g.admin_helpers.notifications.platforms,admin_eshop.cart.mutators). Before, some packages appended their list items to the project list. - The blade view namespaces of packages use the same name as their config:
admin_payments::instead ofadminpayments::(crudadmin/payments) andadmin_eshop::instead ofadmineshop::(crudadmin/eshop). Projects which override the views moveresources/views/vendor/adminpaymentstoresources/views/vendor/admin_paymentsandresources/views/vendor/admineshoptoresources/views/vendor/admin_eshop, and rename the old namespaces in their views and code. Theadmin_eshop.viewspublish tag publishes intoresources/views/vendor/admin_eshop. crudadmin/socialiteroutes are namedsocialite.redirect,socialite.callbackandsocialite.token; they are no longer marked->visible()for the frontend editor, which neededcrudadmin/website.crudadmin/gutenbergroutes are namedgutenberg.oembedandgutenberg.image-uploadand use theadmin.panelmiddleware group.
Localized routes
- Removed the unused
routesconfig key; remove it from project configuration if present. Existing routing behavior is unchanged. - Register language-prefixed routes with
localizedRoutes()of thecrudadmin/websitepackage. localizedRoutes()registers the routes file once for every language instead of per request, so the routes work withroute:cacheand Laravel Octane. The languages are read when the routes are registered: runroute:cacheagain (or reload the Octane workers) after a language is added or its slug changes.- Named routes of the other languages than the default one get the language slug as a prefix (
en.front), the default language keeps the names.route('front')andaction()still return the URL in the current language; for another language useAdminWebsite\Routing\LocalizedRoutes::withLocale('en', fn () => route('front')). - On pages of the other languages
Route::currentRouteName()returnsen.front, check routes withrequest()->routeIs('front', '*.front'). A project with its ownURL::formatPathUsing()callsLocalizedRoutes::formatPath($path, $route)inside its formatter. ?_localewith an unknown language redirects to the default language. The redirect of the default language slug is registered wheneverlocalization.remove_defaultis on.- Deprecated: the
addLocalizationAttributes()router macro,Localization::prefix(),addLocalizedRoutes(),getLocalizedRouter()and$localizedRouters.
Renamed framework namespaces
crudadmin/framework is grouped by area, the Helpers, Contracts, Utilities and Requests namespaces are gone. php artisan admin:upgrade:namespaces (the first step of admin:upgrade) rewrites the references in the project: imports, fully qualified names, class names in strings and Blade templates, use DataStore of classes. While crudadmin/upgrade is installed the old names keep working as aliases, so the project boots before the rewrite. The step reports references it can not rewrite. The moved classes:
crudadmin/crudadmin is grouped the same way, Helpers, Contracts, Controllers, Middleware, Requests and Hashing are gone:
Admin\Models\*, Admin\Admin\Buttons\*, Admin\Admin\Rules\*, Admin\Eloquent\* and Admin\Fields\* keep their names. admin:upgrade:namespaces rewrites these classes too, also real-time facades (Facades\Admin\Helpers\...).
Facades (AdminCore, Fields, Image, ImageCompressor) and the global helper functions keep their names. Run composer update crudadmin/framework after the upgrade, the file with the global functions moved.
Laravel Octane and long running processes
CrudAdmin runs on Laravel Octane and in queue workers. Before every request, Octane task and tick and every queue job (except thesync connection) the state of CrudAdmin returns to the state after the boot.
Admin::cache(),Admin::get(),Admin::set(),Admin::push()andcache()of theDataStoretrait keep values for one request or queue job, under PHP-FPM nothing changes. Code which relied on a value cached in a queue worker for all following jobs reads it again for every job. A newDataStore::persist()keeps values derived from the code and the config for the whole process.- Queue workers forget resolved facades before every job (except the
syncconnection), as Octane does before every request. - New
Admin\Core\State\RequestScopedattribute: a static property marked with it gets its default value back before every request and job, with#[RequestScoped(boot: true)]its value after the boot. The flushers of the packages are replaced by it:Cart::flushState(),LocalizedRoutes::flushState(),ApiSchema::flushState(),CKFinderHelper::flushState(),LocalizationHelper::flushState(),AdminResourcesSyncer::flushState(),Benchmark::flushState()and theflushState()of the bank accounts ofcrudadmin/invoicesare removed, as theRestoresBootStatetrait andrestoreBootState()ofcrudadmin/eshop. - Octane and queue workers keep base fields and relations trees of the models for the whole worker, for every language, as
admin:cachecompiles them. Code infields(),mutateFields(),mutateBootedFields()and field mutations which reads the logged administrator, the request or the database without being detected moves into a runtime mutation,getFields($row)or options. - Static properties which only held constants became class constants:
HasAdminExportsGenerators::$tempDirisTEMP_DIRECTORY,AdminResourcesSyncer::$fieldsTranslatableKeysisFIELDS_TRANSLATABLE_KEYS. The deprecatedFileMutator::$requiredAttributesis removed, useRequiredRules::RULES.SeoModule::$metaKeysofcrudadmin/websiteisSeoModule::META_KEYS,SocialAuth::$errorMessageKeyand$photoColumnofcrudadmin/socialiteareERROR_MESSAGE_KEYandPHOTO_COLUMN. - The booted model properties (
fillable,casts,dates,hidden) and theboot()of model modules run once per worker, language and variant (web,console) instead of once per request. A moduleboot()or acachableFieldsProperties()callback which reads the request beyond the administration, the website and the console overridesgetCachablePropertiesVariant()of the model. - New
Admin\Core\State\RequestSharedattribute for static properties kept for the whole process (registries, caches derived from the code). Mark every static property of the project with#[RequestScoped]or#[RequestShared],php artisan admin:upgrade:staticslists the ones without them and the static variables of functions. - New
Admin\Core\State\RequestState:flushUsing()registers a reset of other state,bootRequestUsing()runs request-dependent code of a service provider for every Octane request (right away under PHP-FPM),iniSet()changes a php.ini option until the end of the request. AdminPackageServiceProviderhas$flush(classes with a staticflushState(), or callables) and'shared' => truefor$facadesentries of registries. Theadmin.fieldsregistry (Fieldsfacade) is a singleton.Localization::fire()runs throughbootRequestUsing(). Localization instances no longer register an ownLocaleUpdatedlistener, one listener registered at boot passes the locale to the instances of the request.LocalizationHelper::$skipChangeEventis removed.autoAjax()->throw(),throwValidation()andrender()throwAutoAjax\AutoAjaxResponseException(aHttpResponseException) instead of sending the response and callingexit. The status and body are the same and code after the call still does not run, but a surroundingcatch (Exception|Throwable $e)now catches it: rethrow it, or pass$etoautoAjax()->error($e), which rethrows it. The response goes through the middleware now (session, queued cookies, CORS).autoAjax()->setMessage()changes only its response, useAutoAjax::setGlobalMessage()orAutoAjax::$messagesat boot for defaults; values can be closures (fn () => _('...')) resolved in the language of the request.onResponseevents always get the AutoAjax instance as the second argument, a callback which returns nothing no longer empties the response.AutoAjax::setEvent()ignores the same callback twice and accepts a key which replaces the previous registration.crudadmin/payments:PaymentService::setPaymentUrl(),setOnPaymentSuccess()andsetOnPaymentError()called in a service providerboot()apply to every request, called later they apply to the current request only. The protected$onPaymentUrldefaults tonull. Removed the unusedPaypalWebhookVerificator::$initialized. A failed payment initialization is tried again by the next call in the same request. Stripe and PayPal webhooks read the body and the signature from the Laravel request.crudadmin/socialite:SocialAuth::onSuccess()affects only that instance, useSocialAuth::setEvent('SUCCESS_DATA_RESPONSE', ...)in a provider for a global handler.addDriver()registers its extension once.crudadmin/eshop: settings of the eshop services called in a providerboot()are kept for every request (Discounts::addDiscount(),addDiscountableAttributes(),OrderService::setMutators(),setStockSync(),setDefaultResetIfNotPresent(),Store::setRounding(),CartDriver::setInitialData()), called during a request they apply to that request only;setInitialData()fromboot()runs for every new cart driver.Cart::setCartToken(),Mutator::setForceCartResponse(), thesetGlobalFilterOptions()scope and the DPD/Packetaset*Builder()calls made during a request are reset before the next one.Store,OrderServiceandCartDriverhave constructors, a subclass with its own constructor callsparent::__construct(). Validation messages of the eshop rules are translated when a rule fails. The bootstrap response cache key has a.b2bsuffix for B2B carts.crudadmin/resources: removedCKFinderHelper::$booted, the connector is bound by the service provider asAdmin\Resources\Helpers\Filemanagers\CKFinder\Connector(a project binding ofckfinder.connectoris kept) andckfinder_config_mutator()runs once per request.- Import, export, invoice and feed time and memory limits apply to the current request or job only.
Removed field parameters
component_data
- Removed the unused
component_datafield parameter; remove it from field definitions. - It never populated component props automatically. Read values from the
fieldorrowprops instead, and review custom code that accessedfield.component_data. - Leaving it in field definitions may cause validation errors because it is no longer a registered field attribute.
- Button
component()data arguments remain supported.
hasOne
- Removed the
hasOnefield parameter. Remove|hasOne(or thehasOneentry in array notation) and keepbelongsTo. - The column and foreign key remain unchanged. The relation now returns Laravel
BelongsToinstead ofHasOne; review custom code that calls relation-specific methods or checks its class. - Leaving
hasOnein field definitions may cause validation errors because it is no longer a registered field attribute. - Laravel
hasOne()and automatic relations to single child models (maximum = 1) remain supported.
ifExists
- Removed the
ifExistsfield parameter; replace it withhideOnCreatein field definitions. - Without the replacement, the field is no longer hidden when creating a record. The replacement keeps the same form visibility behavior; backend validation and saving still apply.
inBackend
- Removed the
inBackendalias; replace it withinAdminin field definitions, including array notation. - The replacement keeps the same admin-only behavior. Leaving
inBackendin field definitions may cause validation errors because it is no longer a registered field attribute.
Removed helpers
isActiveController()
- Removed
isActiveController()from resources helpers. Existing calls will fail with an undefined-function error. - Replace calls with Laravel’s
request()->routeIs()orRoute::currentRouteAction().
Admin\Helpers\Helper
- Removed
Admin\Helpers\Helper(isActive(),currentRoute(),controllerName(),link(),error(),priceFormat(),invoiceFormat()). Userequest()->routeIs()/Route::currentRouteAction()for the route checks,$errors->first()in Blade andnumber_format()/str_pad()for the formatting helpers.
laravel/helpers
crudadmin/frameworkno longer requireslaravel/helpers, so global helpers likearray_wrap(),array_get(),str_slug(),str_random(),str_singular()orstudly_case()are gone unless the project requires the package itself. Replace them withArr::/Str::methods, or runcomposer require laravel/helpers.
Removed Site builder
- Removed the entire Site builder module:
SiteBuilder, block types,Group::builder(),getSitebuilderBlocksArray(),renderBuilder(), the block selector and its styles. Replace block editing and rendering with your own implementation. - Remove
Admin::isEnabledSitebuilder()calls and theadmin:sitebuilder:blockcommand from your project;admin:upgrade:configdeletes thesitebuilderconfig key, removesitebuilder_typesby hand. Custom blocks extendingSBTypeand published Site builder views need replacing too. - Existing block data is not deleted automatically, but CrudAdmin no longer edits or renders it. Migrate any content you still need before upgrading.
Public website features moved to crudadmin/website
- The frontend editor, gettext scripts of Blade pages, language prefixes in urls, SEO and the site tree moved from
crudadmin/crudadminto the newcrudadmin/websitepackage. Projects using any of them runcomposer require crudadmin/website. Config keys (frontend_editor,seo,sitetree,localization.remove_default,storage.allowed_extensions,gettext.json), route names and urls stay the same; their defaults are provided by the package. - The
$seomodel property is part of the package too. Without it, models with$seo(and eshop products and categories) have no meta fields tab and the slug of sluggable models is not editable in the form.admin:migratethen reports themeta_*andslug_dynamiccolumns as unknown; keep them when you are going to install the package. - Moved classes:
Admin\Models\RoutesSeo,SiteTreeandStaticContentareAdminWebsite\Models\…;Admin\Eloquent\Modules\SeoModuleisAdminWebsite\Eloquent\Modules\SeoModule;Admin\Helpers\SEO,SEOService,FrontendEditor,Admin\Helpers\SiteTree\SiteTree,Admin\Helpers\Localization\EditorModeandLocalizationRedirecterareAdminWebsite\Helpers\…;Admin\Core\Casts\EditorCastisAdminWebsite\Casts\EditorCast;Admin\Middleware\LocalizationMiddlewareisAdminWebsite\Middleware\LocalizationMiddleware. TheEditorMode,FrontendEditor,SEOandSiteTreefacade aliases are unchanged. Update project classes extending them, e.g. an ownRoutesSeomodel. - Moved helpers
uploadable(),linkable(),localeUrl(),localizedRoutes(),switchLocale()andencryptText(); Blade directives@translates,@gettext,@editor,@uploadable,@seo,@metatags,@title,@description,@keywords,@image,@authorand@seogroup; route macros->seo()and->visible(), the router macroaddLocalizationAttributes()and thelocalizedmiddleware. Without the package, calls fail and directives are printed as text. - Removed
Admin::isEnabledFrontendEditor(),Admin::isSeoEnabled()andAdmin::isEnabledSitetree(); useAdminWebsite\Features::frontendEditor(),seo()andsitetree(). - Without the package, website localization no longer reads the language from the first url segment or the session:
Localization::get()returns the default language until the application callsLocalization::setLocale().isValidSegment(),segment(),prefix(),saveIntoSession(),getFromSession(),refreshOnSession()andcrossDomainSupport()exist only in the package localization.getLocaleSegmentIdentifier()andgettextJsResourcesMethod()were removed fromLocalizationInterface; custom localization classes may drop them. editorandlongeditorvalues are wrapped in<div data-crudadmin-editor>on non-admin requests only with the package and an enabled frontend editor (frontend_editor.enabled). Otherwise, also in API responses, the value is returned as it is stored.- Slugs in the language the visitor switched from (
_previous_locale) are found only with the package. Packages set the resolver withAdminModel::resolvePreviousLocaleUsing(); editor field casts are added withAdminModel::addFieldTypeCast(). - Clear compiled Blade views after the upgrade (
php artisan view:clear); views compiled with the old@gettextdirective call the removedGettext::getJSPlugin(). - Frontend scripts are built in the package and published to
public/vendor/crudadmin-website(FrontendEditor.js,Gettextable.js,frontend.css) byphp artisan admin:updateor theadmin_website.assetstag;admin:updatealso adds the directory into the project.gitignore, so the built files are not committed./vendor/crudadmin/build/assets/FrontendEditor.js,Gettextable.jsandfrontend.cssno longer exist; update custom script tags. The administration no longer installswindow.action()andwindow.decryptText(). JSTranslations::getJavascript()moved to the package,Gettext::getJSPlugin()becameJSTranslations::getScriptUrl()of the package.GET /admin/api/bootstrapno longer acceptscontext=editor; the editor usesGET /admin/api/frontend-editor/bootstrap.- Models no longer receive
siteTreeColumns(),scopeOnSiteTreeLoad()andgetTreeAction(). Models with$sitetreeload their key, the$sitetreecolumn and the slug; declare these methods on the model or use theAdminWebsite\Eloquent\Concerns\HasSiteTreetrait.parent::siteTreeColumns()calls fail without the trait. - Removed
turnOfCacheForAdmin()of the package service provider. It only setadmin.cache_time, which nothing read; remove its calls from packages.
Removed admin preview state
- Removed
$publishableState,withTemporaryPublished()andisAdminPublished(). Remove these declarations and calls from project models and code. - Publishing now toggles directly between hidden and published, including
SiteTree. Former preview rows withpublished_at = nullstay hidden on the website, even for logged administrators; publish them explicitly when ready. published_stateis no longer created, cast or read. Review existing preview rows before dropping this obsolete column during migration.- For publication checks, use
published_at(set and not in the future). For a custom preview, usewithUnpublished()in a controller with your own access checks.
Removed $seoVisible
- Removed
$seoVisibleand automatic hiding of SEO attributes on frontend requests; remove the property from your models. meta_title,meta_keywords,meta_description,meta_canonical_url,meta_imageandslug_dynamicnow follow normal model serialization. Use$hiddenormakeHidden()if these fields must stay out of array and JSON responses.
Removed columns.*.title
- Removed translation support for
columns.*.title; replace it withcolumns.*.namein model settings (for example,columns.price.name). titledid not change table headers.namesets the column header and remains translatable; a field’scolumn_nametakes precedence.
Removed grid.header
- Removed
grid.headerfrom the feature reference; remove it from model settings if present. - The administration never read this key, so removing it does not change the layout or headers.
Removed header.visiblePermanently
- Removed
header.visiblePermanently; remove it from model settings. Single-record forms can no longer force the header to remain visible through this setting, so review any custom header components or actions. - The header still appears automatically for localized fields, the gettext editor or an opened record with history.
form.header = falsestill hides it.
Validation rules are built once
- One
Model::validator()instance builds its rules and mutated data once, untilonly(),merge()orreplace()change it. Repeatedget(),getData()andfill()calls no longer run the request mutators again, so a file of a validated field is uploaded once and a request changed in the meantime is not read again. - Fields are resolved for the validated row only when the model or its modules read it. Models building fields dynamically without the
fields($row)parameter should overridehasRowDependentFields()and returntrue.
Renamed keepInRequest to allowInput
- Replace
keepInRequestwithallowInputin field definitions, including array notation. The old name is no longer supported. - Behavior is unchanged:
allowInputaccepts submitted values forremoveFromForm,invisibleanddisabledfields on create and update. Validation still applies. - Without the replacement, these values are ignored; the obsolete parameter may also cause validation errors.
Replaced settings.keyName with $primaryKey
- Remove
keyNamefrom$settings. The administration now reads the model’s actual key through EloquentgetKeyName(); configure Laravel’s$primaryKeyproperty if your database key is notid. - The old setting only changed frontend behavior. Do not move a display-only column into
$primaryKey: it changes how Eloquent identifies, updates and deletes records. - The model tree now includes
primaryKey. Update custom frontend code that readsettings.keyName; the frontendgetKeyName()method remains available.
Removed $bus
- Removed the global
$busanduseEventHub()APIs. Replace custom listeners withwindow.addEventListener()and emitCustomEventevents; payloads are available asevent.detail. Remove listeners when components unmount. - Gutenberg editor switching uses native browser events. Update resources together with the Gutenberg integration; custom code using the old
closeMenuordisableGutenbergEditorsevents must be updated. The sidebar keeps the state of its opened groups itself.
Replaced settings.xls with TableExportXls
- Remove
xlsfrom model settings and add\Admin\Exports\TableExportXls::classto$exports. Installphpoffice/phpspreadsheetif needed. - The rows endpoint no longer accepts
downloadto create files. Use the standard export endpoint and itsdownload_urlresponse; replace custom uses of the removedSheetDownloaderhelper. - Table formatting, filters and the
setSheet{Column}Attribute()/setExcelSheet()hooks are preserved. Files now use the normal private export storage; empty results produce a valid workbook.
Gettext-only administration translations
- Removed the resources
trans()mixin method,window.trans,useTrans()andlayout.localizationdictionary. Use literal__('Source message')calls in JavaScript/Vue and_('Source message')in PHP/Blade. - Custom admin components and extension packages (including eshop and invoices integrations) must not call
trans(),this.trans(),window.trans()oruseTrans()in JavaScript/Vue; these APIs no longer exist. Replace keys with literal gettext source messages. - Laravel’s PHP
trans()helper still exists: calls such astrans('validation.required')use Laravel validation translations and are unaffected by removal of the admin frontend helpers. Use gettext for your own administration UI messages. - Removed resources
admin::admin.*PHP catalogs. Administration uses the admin gettext catalog. Guest authentication screens use only an allowlist of bundled authentication messages. Move custom private translations into the admin gettext catalog; they are loaded after verification. - Field
name,title,placeholderand model labels already use gettext. Replace legacy keys such asname:admin::admin.keywith literal source text, for examplename:Názov. Without migration the old key is displayed as text.
Model and field texts are translated in the administration only
AdminResourcesSyncer::translate() returns the source string outside the administration and the console. Model names, field labels, permission titles and model settings reach the website through relations, components and exports, and translating them there loaded the whole administration catalog for a request that never showed them.
- A website which displayed a translated
$name, a fieldnameor a model setting has to translate it itself._('text')in the model or the view keeps working, it is the native gettext of the request language. - The catalog is read as a plain map of source strings, generated once per
.porevision into the crudadmin storage. Deploys which ship a prebuilt storage directory keep working; a read only storage rebuilds the map per request.
Built-in admin components use script setup
- All built-in administration Vue components now use
<script setup>and are closed by default. Custom components can no longer read their state or call their methods through$parent,$refsor$root(for example$parent.isField(),$parent.getGroupModel(),$root.flattenModelsWithChilds(),openedon sidebar rows orrunModalCloseron modals). Pass the data through props or read it from the model and the Pinia stores instead. - Components rendered through model
componentsstill receivemodel,rowandrowsas props, and$parent.model,$parent.rowand$parent.rowskeep working there. - The form group component is registered as
FormGroupinstead ofform-group; update custom code that resolved it by that name. - License server callbacks no longer run with the component instance as
this. They get an object with the same state and methods, but without$-prefixed instance properties. - Custom components loaded from
resources/views/admin/componentskeep using the Options API (export default { ... });<script setup>is not supported there.
Removed $localization
- Removed the
$localizationmodel property (rows stored per language inlanguage_id), thelocalization()query scope,isEnabledLanguageForeign(), the--localizationoption ofadmin:modeland thelocalizationkey of the model tree. Remove the property from your models. For translated content of one record uselocalefields. - The administration no longer has the language switch above the table, does not send
language_idwith row, export or save requests and does not filter relation select options by language. Rows of all languages are listed together, and new rows are stored withoutlanguage_id. language_idis no longer created by migrations nor fillable. Existing columns and data are kept:admin:migratereports the column as unknown and asks before dropping it,--auto-dropdoes not drop it. While it exists, its foreign key still blocks deleting a language used by those rows. Keep it through the replacement below, or merge or delete the per-language rows and drop the column yourself.- Replacement: declare
language_idas a regular field bound to the languages model and add one filter button per language. Existinglanguage_idcolumns and data keep working, the column type and foreign key match. ReplaceModel::localization()calls withwhere('language_id', ...). Models usingHasEntryLocalesneed the field too.
Admin routes
- All admin endpoints moved to one url scheme and got route names (
admin.*). There are no redirects from the old urls; update custom code which calls them directly. - Internal endpoints of the administration live under
/admin/api/models/{table}/…:rows,rows/{id},order,fields/{field}/options,buttons/{button},exports/{export},settingsand history. Creating a row isPOST /admin/api/models/{table}, updatingPUT /admin/api/models/{table}/rows/{id}. The model and row are taken from the url,_modeland_idin the request body are ignored. - Authentication endpoints called by the login form moved to
/admin/api/auth/…(login,password/email,password/reset,verification). Browser pages such as/admin/loginand/admin/logoutare unchanged. - Downloads moved to
/admin/files/…:/admin/download/fileis now/admin/files/{table}/{field}/{file},/admin/user/download/{hash}is/admin/files/secured/{hash}and/admin/download/signed/{hash}is/admin/files/signed/{hash}/{table}/{field}/{file}. Signed links already sent by e-mail stop working; generate them again with$file->download(). - The gettext editor moved to
/admin/api/translations/{language}/{table?}, the stateless editor link to/admin/translations/editorand admin translations to/admin/translations/admin.js. Switching the admin language isPUT /admin/api/user/language/{id}./vendor/js/ca-translates.jsis unchanged. - Frontend editor endpoints moved from
/frontend-editor/*and/translates/*to/admin/api/frontend-editor/*.FrontendEditor::routes()was removed; the routes are registered automatically. - Statistics are
POST /admin/api/statistics/{key}, the site tree is saved byPUT /admin/api/sitetree, the development benchmark is/admin/api/dev/benchmark. - The REST API moved to
/admin/api/v1/…:/admin/api/model/{table}is now/admin/api/v1/models/{table}, rows are updated byPUTorPATCHinstead ofPOST,/admin/api/models_scheme/{table?}is/admin/api/v1/models/{table}/schemeor/admin/api/v1/scheme, and the helpers auth routes (auth/login,user) moved under the same prefix. Swagger moved from/admin/swaggerto/admin/api/v1/docs. Update external API clients. - The
hasAdminRolemiddleware reads the model from the{model}route parameter, then from themodelinput. The_modelinput is no longer read.
Removed window.crudadmin.layout.requests
- Removed the
requestsurl map fromwindow.crudadmin.layoutand theuseRequest()helper. Custom Vue components callinguseRequest()fail with an undefined function error. - Use the api composables instead:
useModelApi(table)(rows(),show(),options(),button(),export(),formUrl(),downloadUrl(), …),useAuthApi(),useTranslationsApi(languageId)andusePanelApi(). Requests made withuseAxios()are relative to/admin, souseAxios().$get('/api/…')keeps working for custom endpoints.
Removed model slug alias
- Removed the
slugkey from the model tree; it was an alias oftablewith the same value. Replacemodel.slug,row.slugandmodels[key].slugwith.tablein custom Vue components and JavaScript.getModelBuilder()compares withmodel.table. - Sidebar items now use the
data-modelattribute instead ofdata-slug, with the same value (table name, or the group key for menu groups). Update custom CSS, scripts and browser tests that selectli[data-slug="…"]. Thedata-slugattribute of the form language switch is unchanged.
Model loading states
- Model loading flags are grouped under one
loadingdata key:loading.row(row opening in the form),loading.button(running button action) andloading.gettext(translations loading before the gettext editor opens). Replacemodel.getData('loadingRow')withmodel.getData('loading').rowandmodel.getData('button_loading')withmodel.getData('loading').buttonin custom Vue components. The old keys are removed without aliases.
JSON bootstrap and PHP helpers 2.0
-
The admin now loads initial data from
GET /admin/api/bootstrap. Remove overrides ofadmin::partials.crudadmin-props; that view no longer exists. Custom admin shells must include anadmin-bootstrapmeta tag containingroute('admin.bootstrap')and initializewindow.crudadmin.components. -
Removed
window.crudadmin.layout,window.crudadmin.filemanager,window.crudadmin.loggedandwindow.crudadmin.verified; there are no compatibility getters. Read private configuration throughuseSettingStore()and session state throughuseAuthStore()after bootstrap (boot.ready === true). Replacelayout.modelswithuseSettingStore().tree(or.modelsfor the flattened map),layout.userwithuseAuthStore().user, andlayout.authwithuseAuthStore().config. Component registration throughwindow.crudadmin.componentsremains supported. - The public-page editor fetches its own restricted bootstrap configuration. Publish matching resources assets together with the PHP changes. Login and successful verification now return bootstrap data and navigate without an admin document reload.
-
PHP
crudadmin/helpers2.0 requires CrudAdmin 6 and framework 6.0.1 or the matching6.0-devbranch. ItsBootstrapRequestinherits section composition and cache from the framework; existing project subclasses retain their namespace, client and token handling. Replace pinned1.4.0constraints with^2.0when upgrading. -
App store startup flags now live in
boot(ready,loading,error,componentsLoaded); replacebootedchecks withboot.ready === trueandisLoadedwithboot.componentsLoaded. Readlocaleand contentlanguagesfromuseLocaleStore()(@crudadmin/helpers/store). Replaceadmin_languageswithuseSettingStore().languages, read the selected interface language from the locally extendeduseLocaleStore().currentgetter, and readgettextfromsettingStore.editor.gettext. The temporaryappStore.localizationgroup is removed, andmodel_settingsis nowsettingStore.editor.available, set bycrudadmin/admin-editor. Update custom components reading the old top-level fields. -
Admin\Core\Bootstrap\BootstrapRequest(framework): a cache array of a section readsdurationas an alias ofminutage. Projects which useddurationgot the default 60 minutes until now and get their configured minutes now. Cache keys of a section get a.v{n}suffix after the firstforgetCache($section); nothing changes before it. -
A guest requesting
authenticatedthroughonly()gets nothing (it was computed before). A guest requesting directly a section which only an overriddenauthenticated()composes (notget()orguest()) gets a 403, like a section of the$authenticatedproperty; before it was computed without a client. Sections composed byget(),guest()or another loaded section are not affected. -
The framework
BootstrapRequestdeclaresprotected $baseSectionsandprotected $sections(opt-in whitelist,nullby default). A subclass declaring aprivateproperty of the same name must rename it. -
The admin-specific bootstrap request and controller live in
crudadmin/crudadmin(Admin\Bootstrap\AdminBootstrapRequest,Admin\Http\Controllers\BootstrapController). The reusableAdmin\Core\Bootstrap\BootstrapRequestremains incrudadmin/framework. -
CKEditor receives filebrowser URLs directly in its instance configuration. Custom editor initializers must supply those options from
useSettingStore().filemanagerinside the admin orCAEditor.config.filemanagerafter public-page editor bootstrap. Republish the matching CKEditorconfig.js; thewindow.crudadmin.ckeditorConfig(config)customization hook remains supported. -
Authentication form configuration is grouped under
useAuthStore().config.form:column,input_type,title,placeholder,password_resetand flashederrors. Update custom login/reset views; provider selection remains underconfig. -
appnow contains public startup/CSRF state andlogo. Move reads of models/tree, versions, environment, author/copyright, paths, filemanager, statistics, dashboard, license and editor settings touseSettingStore(). Thesettingbootstrap section is forbidden until authentication and 2FA are complete; session loss resets private stores. -
Pinia now persists private settings, the last verified identity, locale and logo per bootstrap URL, including in development. A complete cache renders before background session verification; stale permissions or a previous session can remain visible until the response arrives. Every request remains authorized by the server. Logout/session loss clears the cache; CSRF tokens and boot flags are never persisted. Custom shells should add
admin-app-hashwithAdmin::getAppHash()only when(new Admin\Bootstrap\AdminBootstrapRequest)->isAuthorized(); the cache is used only when it was stored for that hash, so a shell without it, or with a changed hash, always waits for a fresh bootstrap. -
Login and verification responses now contain
store; custom auth flows must awaituseBootstrap().applyBootstrap(response)before entering private routes. The fresh CSRF token is instore.app.csrf_token. JSON logout returns the public bootstrap. Redirects outside the admin still leave the document. -
Project scripts/styles and meta/scripts slots now load after private bootstrap. Register components immediately when a script executes instead of relying solely on
window.load; make session initialization idempotent. The guest shell uses a generic title; the login logo remains public throughapp.logo. Other project assets load only after verification. -
Admin translations now arrive as
store.locale.translationswith bootstrap/login/logout responses. ReaduseLocaleStore().translationsinstead ofwindow.CATranslates; remove custom loading of the admin translation script. Guest and pending-2FA catalogs contain only bundled authentication messages. The public-page editor keeps its separate translation script. -
The admin installs the shared
CrudadminVuetranslation plugin from@crudadmin/helpers; use matching helpers with reactive catalog replacement.window.CATranslatorandwindow.GettextTranslatesare no longer installed inside the admin. ImportTranslatorfrom@crudadmin/helpersfor a separate catalog; use itsgetTranslator()for gettext methods. Vue translation methods and the global__/n__helpers remain available.
SmartSMS moved to crudadmin/helpers
Admin\Helpers\SmartSmsmoved toAdminHelpers\Sms\SmartSmsin thecrudadmin/helperspackage. Update imports in your code. Thesmartsmsconfig and theSMARTSMS_*environment variables are unchanged.Admin\Notifications\SmartSMSChannelis removed.crudadmin/helpersregisters the notification channelsms(AdminHelpers\Sms\SmartSmsChannel), which sendstoSms()of a notification to thephoneof the notifiable, or torouteNotificationForSms().- The SMS login verification sends its code through the
smschannel. Withoutcrudadmin/helpers, register your ownsmschannel withNotification::extend('sms', ...), otherwise the code is not sent.
Removed MAIL_DEV_WHITELIST
- Removed the
CheckDevEmailWhitelistmail listener and theMAIL_DEV_WHITELISTenvironment variable. Since Laravel 9 it stopped every e-mail once the variable was set. UseMail::alwaysTo()in a service provider of your development environment, or a local mail catcher. admin:encrypt-existingwrites encrypted values straight into the table and no longer saves the rows through the model, so model events, rules and history are not triggered andupdated_atis kept. New--dry-run,--modeland--chunkoptions.
REST API moved to crudadmin/api
- The REST API (
/admin/api/v1/…), its OpenAPI description and the Swagger UI moved to the optionalcrudadmin/apipackage. Projects using them runcomposer require crudadmin/api. URLs and route names of the token endpoints are unchanged; theapi.loggingconfig default comes from the package. - Moved classes:
Admin\Controllers\Api\ApiControllerisAdminApi\Controllers\ApiController. TheHasAdminApitrait is removed fromAdminModel:getAdminApiColumns(),getAdminApiRelations(),getAdminApiFieldType()andgetAdminApiFieldName()areAdminApi\Schema\ApiSchema::columns(),relations(),fieldType()andfieldName()with the model as the first argument; thebootAdminApiResponse()scope isapp(AdminApi\Formats\Format::class)->query($model, $query, $request);setFullAdminApiResponse()isAdminApi\Response\ApiResponse::row($row). The model hooksscopeWithAdminApiResponse()andsetAdminApiResponse()keep working. - The API now reads and writes through the same code as the administration (
Admin\Crud\RowReader,Admin\Crud\RowWriter).scopeAdminRows()is applied, so rows hidden in the administration are not listed, shown, updated or deleted through the API. Validation, request mutators, uploads, belongsToMany sync, history,onCreate/onUpdateand admin rules run as in the administration; create no longer uses$model->validator(). Update validates and saves only the sent fillable fields, a request without them returns the row unchanged. - Responses follow Laravel API Resources: lists are
{ data, links, meta }instead of{ error, data: { pagination } }, one row is{ data }instead of{ data: { row } }, create answers201, delete answers204without body,/admin/api/v1/modelsreturns{ data: [{ table, name, relations, operations }] }, and login and/userreturn{ data: { user, token } }. Errors are{ message }(validation{ message, errors }) with400,401,403,404or422instead of thetype,titleanderrorkeys of autoAjax. - Query parameters follow spatie/laravel-query-builder:
_with/withisinclude=author,comments.author(relation:columnsisfields[table]=columns),_columns/columnsisfields[table]=columns,_where[column,operator]isfilter[column]=>=10,_where[column,in]isfilter[column]=a,b,_where[column,notnull]isfilter[column]=!null,_scope[name]=valueisfilter[name]=value,_selectorisselector.limitisper_page(up toadmin.api.max_per_page, 100);limit=-1for all rows is removed, iterate the pages. New:sort,filter[column]=~text,include=relationCount. Unknown filters, sorts, includes and fields answer400instead of422. - Relation names in
includeand inApiSchema::relations()are camelCase (schemaApiCommentsinstead ofSchemaApiComments). Included relations are limited byscopeAdminRows()of the related model and need itsreadpermission. Relation methods which are not fields, child or parent models (accepted bywithbefore) have to be listed in the$apiRelationsproperty of the model. - Only API columns and the existing timestamps are returned. Password fields,
inaccessiblefields,$hiddenattributes and table columns which are not fields (e.g.remember_token,logout_date,deleted_at) are no longer returned, selected, sorted or filtered. - Tokens issued by
POST /admin/api/v1/auth/login(also OTP and socialite login) are read only (api,api:read); clients which write rows have to sendaccess=writeon login (addsapi:write). They are valid only for the REST API; the administration answers403to them. Clients which used a REST API token for admin endpoints need a token with theadmin(or*) ability. Existing*tokens keep working everywhere. /admin/api/v1/modelslists only models with thereadpermission. The login credentials are documented in the request body of the OpenAPI description instead of query parameters.- The stateless frontend editor token (
/admin/translations/editor) has only thefrontend-editorability, it is refused by the administration and the REST API. - Passwords, tokens and secrets are left out of the REST API request log.
- The
crudadmindriver ofcrudadmin/socialitereads the signed in administrator from/admin/api/v1/userinstead of/admin/api/user, so the CrudAdmin which acts as the OAuth server needscrudadmin/api. Servers which serve the user elsewhere setuser_pathinservices.crudadmin. - The session Swagger scheme moved from
/admin/api/v1/openapi.json|yamlto/admin/api/v1/docs/openapi.json|yaml;/admin/api/v1/openapi.json|yamlis now a token route for API clients. The scheme is generated in PHP:/admin/api/v1/schemereturns valid YAML with quoted values, and the description now includes theDELETEoperation. - Renamed
Admin\Controllers\Crud\Concerns\CRUDRelationstoAdmin\Crud\Concerns\SyncsBelongsToMany; admin rules reading pivot data of abelongsToManyfield (getPivotData()) use the new trait. Removed the validation and insert methods ofCRUDController,InsertControllerandUpdateController; they live inAdmin\Crud\RowWriter.UpdateControllerno longer extendsInsertController.getModel()of the CRUD controllers comes fromAdmin\Crud\Concerns\ResolvesAdminModels.
Login security
- The login verification code (sms / e-mail) is invalidated after 5 wrong attempts (
verificatorMaxAttempts()of the auth model); a new code is sent when the verification state is requested again. Codes are generated withrandom_int().GET /admin/verificatoris throttled like the json verification endpoint. - The admin hasher respects the
hashing.bcryptconfig. - Frontend editor writes of the session editor (
/admin/api/frontend-editor/*) require a verified login and respect remote logout, as the admin panel.
Minimum requirements
- CrudAdmin 6 requires PHP 8.3 or newer, Laravel 12 or 13 and MySQL 8.0 or newer. It is tested on PHP 8.5. Laravel 11 and older are no longer supported; the Doctrine DBAL fallback and the MySQL 5.7 check of the migrations are removed.
crudadmin/crudadminrequireslaravel/sanctum4.published_atis always cast todatetime, also on models that still declare the$datesproperty, which Laravel ignores since version 10.laravel/uiis required bycrudadmin/resourcesfor the administration login and password reset. Its auth scaffolding (php artisan ui) is not used by CrudAdmin.
PHP 8.5
- PHP 8.5 deprecates the driver-specific
PDO::MYSQL_ATTR_*constants. Every project with the default Laravelconfig/database.phpreportsConstant PDO::MYSQL_ATTR_SSL_CA is deprecatedon each request. Replace the key in theoptionsof themysqlandmariadbconnections:
config/database.php
- The condition keeps the config working on PHP 8.3 and 8.4, where
Pdo\Mysqldoes not exist. Replace otherPDO::MYSQL_ATTR_*constants the same way.
Model configuration properties
PHP 8.5 lets a class read a protected property redeclared in a sibling class. Every admin model redeclares$name, $title, $icon, $active and more, so in a model method, model trait or closure inside a model, $city->name of another model returned the module name (Cities) instead of the column. PHP 8.3 and 8.4 returned the column.
CrudAdmin 6 moves configuration properties that share a name with a value of the row (a field, an accessor or a relation, and always $name and $title) out of the model once it is constructed. $row->name returns the column on every PHP version, also inside the model itself.
- Read the model configuration only with
$this->getProperty('name')and change it with$this->setProperty('name', $value).$this->namein a model now returns the column, before it returned the property. - An assignment
$this->name = ...after the model is constructed sets the attribute and is saved into the database. Assignments in the constructor beforeparent::__construct()still set the configuration. - Eloquent properties (
$table,$hidden,$visible,$fillable,$casts,$with,$connection…) stay regular properties. A column with such name is read as the property inside models. Rename the column, or read it withgetAttribute().
Fields and the logged administrator
- Fields are cached the same for everybody, in the process and in
php artisan admin:cache. Permission parameters (hasAccess,hasNotAccess) andinAdminare applied on top of them only in the administration and the REST API, once per request after the administrator is authenticated. Previously they were applied everywhere and the compiled cache stored them resolved as for a guest. - Outside the administration (frontend, console, migrations) permission parameters and
inAdminare ignored.hasNotAccessno longer applies its parameters on the frontend, e.g.hasNotAccess:update,invisibledoes not remove the field fromModel::validator()anymore. - Administration requests no longer rebuild fields of all models. Rebuild them with
$model->getFields(null, true)only if they depend on something else than the administrator, e.g. the session. - Removed field parameters
inFrontendandinConsole. Add frontend rules directly into the validation of your frontend request, and console only parameters into the field definition.inAdminstays. - Avoid
admin()andadmin()->hasAdminAccess()in model definitions (fields(), groups,mutateFields()). Use the ruleshasFullAccess,hasNotFullAccess,hasAccessandhasNotAccesson fields and on group attributes (Group::attributes(),Group::add()) instead, e.g.(admin()?->hasAdminAccess() ? '' : '|hideFromForm')becomes|hasNotFullAccess:hideFromFormand->attributes($isAdmin ? '' : 'removeField')becomes->attributes('hasNotFullAccess:removeField'). New ruleshasFullAccessandhasNotFullAccessapply parameters for super administrators or for everybody else. - Rules only add parameters. A parameter which was turned off for super administrators (
'hidden' => $isAdmin ? false : trueinside a hidden group) is replaced by an opposite parameter, e.g.hasFullAccess:column_visible. - Models whose
fields()still calladmin()are detected and built again for the authenticated administrator in every administration request; the compiled cache holds them as without the administrator. The administrator read byauth()->user(),request()->user()or own helpers is not detected, useadmin()or permission parameters. admin()returnsnullwhile fields are cached: when the relations tree and the compiled cache are built and while a model boots.- Permission parameters must not add relations (
belongsTo,belongsToMany). Relations are built from fields without the administrator. - The compiled cache format changed, run
php artisan admin:cacheafter the upgrade. Caches of the previous format are ignored. - Custom field mutations depending on the administrator implement
Admin\Core\Fields\Mutations\RuntimeMutation(runtime($field, $key, $model)). They are skipped when fields are built and applied in the administration to fields with one of their$attributes.
Removed legacy classes and methods
- Removed
Admin\Helpers\Ajaxand itsAjaxalias (CrudAdmin 3). UseautoAjax()->success(),->error(),->message()and->throw(). - Removed
Admin\Models\Model(CrudAdmin 1). ExtendAdmin\Eloquent\AdminModel. - Removed
Admin\Helpers\FileandAdmin\Core\Helpers\File. UseAdmin\Core\Storage\AdminFile, which has the same methods. - Removed
Admin\Eloquent\Casts\DecimalCast. CrudAdmin never applied it to any field; copy it into the project if a model uses it in$casts. - Removed unused model methods:
filePath()(usegetStorageFilePath()andgetFieldStorage()->path()),scopeFilterByParentField()andcheckForChildrenModels()(theHasChildrenstrait). - Removed
hasAccessByTable($table, $permission)of the admin user. UsehasAccess(Admin::getModelByTable($table), $permission). - Removed
Button::errorToast($message). Usetoast($message, 'error'). - Role permissions are read only from the JSON cast. Permissions saved as plain strings by CrudAdmin 3 and 4.1 are no longer decoded; resave the roles in the administration.
datevalues stored in thed.m.Yformat are no longer read; the value isnull. Convert such columns toY-m-d. Writingd.m.Ystrings from your code still works.- With a symlinked cache folder, old
/uploads/cache/…image URLs no longer redirect to/cache/…. Update hardcoded image URLs.
Renamed upload properties
$delete_filesis renamed to$deleteFiles.$imageLossyCompression,$imageMaximumProportionsand$imageLosslessCompressionare replaced by one property$imageProcessingwith the keyslossy,resizeandlossless. Declare only the keys you change, the others keep their defaults:
Internal model methods are private
Methods ofAdminModel used only by CrudAdmin itself are private or protected. Calling them from outside the model ends with BadMethodCallException from the query builder, because Eloquent forwards unknown calls there.
- Now
protected, override them in the model as before:hasRowHistory(),hasGettextSupport(),defaultModelPermissions(),getUserPermissions(),addModule(),addSkipDroppingColumn(),cachableFieldsProperties(),withMultiCast(),getFieldsGeneration(),newInstanceWithoutConstructor(),canPermanentlyDeleteFiles(),isAllowedHistorySlugs(),generateEncryptedHash(),getComponentPaths(),hasAutoLogoutSupport(),getLogoutSessionKey(),getFullAccessMessage(), the login verificatorsendVerificatorCode(),generateVerificationCode()andverificatorMaxAttempts(), andAdminRule::isFieldDirty(). - Now
private, no longer available in models:initTrait(),flattenGroups(),makeFillable(),makeDateable(),makeSingle(),removeHidden(),removeVisible(),removeAppends(),buildBaseFields(),bootAdminModules(),bootCachableProperties(),bootRelationships(),getModules(),getModulesWithMethod(),getFieldsByRow(),refreshFields(),withoutOptions(),getCachedRelationsTree(),toAdminArray(),getHistoryRows(),castHistoryData(),removeWithRelations(),isRuleSilent()and the internal helpers of casts, slugs, rules and the replicator. - Removed unused methods:
getFieldsWithOptions(),getBaseModelTable(),returnRelationItems()and the old relation resolver (returnAdminRelationship(),relationResponse(),isAdminRelationLoaded(),getRelationFromCache()). Relations are resolved bybootRelationships()since CrudAdmin 5. - Removed
AdminModel::$adminBooted.$globalPublishableand$globalModelPublishableare private, usesetGlobalPublishable()andsetGlobalModelPublishable().$callablePropertiesand$localizedResponseLocalArrayare private.AdminModelModule::$modelis protected, usegetModel().
Reserved column names
admin:migrate reports fields named like a property of the model, for example table, visible, hidden, casts or attributes. Eloquent returns the property instead of the value of the row, so such a column is unreadable inside the model and, since PHP 8.5, also in other admin models.
- A new field with such a name stops the migration. Rename the column.
- A column of an already migrated table is only reported, projects keep working.
- Keep the name with
protected $ignoredReservedColumns = ['table'];on the model and read the value withgetAttribute('table').
Models without a migration date
AnAdminModel descendant without $migration_date was skipped silently. Every instantiable descendant is registered now, so a class which is not meant to be a module has to say so.
- A shared parent of admin models must be
abstract. Non instantiable classes are never registered. - A class which is not a menu item by its nature implements
Admin\Core\Eloquent\Concerns\NotAdminModule. The interface is inherited, so it covers the whole subtree.AdminPivotimplements it already, its descendants need no change. - A class of such a subtree which is a module anyway, for example a pivot with its own fields or menu item, implements
Admin\Core\Eloquent\Concerns\AdminModule. A remaining$migration_datestill keeps it registered until the upgrade replaces it. - Any other class without a date is an ordinary module. It is placed in the menu by its
$groupuntil the navigation section lists it. - A model extending a registered admin model over the same table replaces it, also under another class name (a project
NotificationextendingAppNotificationofcrudadmin/helpers). v5 did the same through the shared$migration_date; the parent is not a module of its own then. A child with its own table (a log extending the model it logs) and a model implementingAdmin\Core\Eloquent\Concerns\AdminModelReplica(another page over the table of its parent) do not replace the parent, both stay registered.
Menu in the navigation section
The menu is declared by thenavigation section of bootstrap/admin.php, a tree of model basenames and #groups with their name and icon. The groups config key and the $migration_date ordering are replaced by it.
bootstrap/admin.php
php artisan admin:upgrade:navigationcaptures the menu CrudAdmin 5 renders, beforeadmin:upgrade:datesremoves the dates which order it. It moves every group ofgroupsinto the section with its name in the source language and its icon, including groups without a model, removes thegroupskey fromconfig/admin.php, removes a literalprotected $groupfrom theapp/models the section places (agroup()method stays) and writes the order of child models into their parent’schildssetting. Models switched off with$active = falseare not captured. A model whosegroup()needs the logged administrator is reported and keeps being placed at runtime. Run it once and commit the files;--recapturecaptures again over an existing section.admin.groupsis reported by the config check like the other changed keys; its value keeps working until the step moves it. Packages still merge their groups intoconfig('admin.groups'), they are used for groups the section does not name.- A model the section does not list is placed by
$groupat the end of that group, so$groupstays the default placement of new models and of package models. A project without the section renders the CrudAdmin 5 menu. - The order of the models set follows the section;
models_orderof the development line is no longer read and is dropped by the next write of the file. Children of a model are ordered by itschildssetting, then by the models set. getModelGroupsTree()was removed from admin models. Read the menu fromAdminTree::get()orAdmin\Navigation\Navigation.- The sidebar was rewritten:
SidebarRow.vueis replaced bySidebarMenu,SidebarItem,SidebarGroupandSidebarModel, and thecrudadmin:close-sidebar-menubrowser event no longer exists. Classes (sidebar-menu,treeview,treeview-list,treeview-menu,active) and thedata-modelattribute are unchanged. - With
crudadmin/admin-editor, Upraviť menu in the Editor mode dropdown (or the pencil of the sidebar) edits the section in a modal: drag models and groups, create groups, rename groups and models, change their icons. Renaming a model rewritesprotected $namein its source file.
$icon replaced by the icon setting
$iconand anicon()method are no longer read. The icon of a model is theiconsetting: declare it in$settingsor return it fromsettings(),bootstrap/admin.phpoverrides it like any other setting. The model tree still sends it to the Vue app asicon.models.<Basename>.nameinbootstrap/admin.phpstill overrides$name, e.g. a renamed model of a package; aname()method is not overridden. It is a property of the model, not a setting.php artisan admin:upgrade:iconsmoves a literalprotected $iconof the models ofapp/intomodels.<Basename>.iconof the file and removes it from the model; an empty$icon(null,'') is only removed. Anicon()method and a computed$iconare reported, move them intosettings()by hand. Models of packages declareiconin their own settings.admin:upgraderuns the step afteradmin:upgrade:settings.getProperty('icon')returns nothing any more, readgetModelIcon()of the model.
$migration_date is gone
The models set is keyed by class name and ordered by the administration, not by a date declared on every model.
php artisan admin:upgrade:datesremoves the property. Run it as the last upgrade step, afteradmin:upgrade:navigation, which captures the order first; it refuses to run without the navigation section. The section names models by their class basename, so moving a model to another namespace keeps its position.php artisan admin:modelno longer writes$migration_dateinto new models.- Two models with the same date are no longer a conflict, and a model without one is an ordinary module.
- A
NotAdminModulemodel was registered only by its date. The command addsimplements AdminModulewith its import before it removes the date, so the model stays registered. A model outsideapp/or with an inherited date keeps the date and is reported. - Migration order no longer depends on the date: foreign keys are added after every table exists.
Table sorting runs in the database
- A click on a column header, the field
orderByparameter andcolumns.*.sort_bynow sort all records in the database and load the first page again. Before, only the loaded page was sorted in the browser, and the pages kept the order of$orderBy. - belongsTo, select and radio columns are sorted by their labels, empty values come last. Rows mutated by
setAdminRowsAttributesare sorted by their stored value, not by the displayed one; sort such a column withset{Column}AdminSortorcolumns.*.sortable => false. - Virtual columns, belongsToMany,
multiple,encryptedandjsonfields are still sorted in the browser within the loaded page, the header says so. scopeAdminRows()orders follow the chosen column.AdminRows::getRowsDataQuery()applies theorderrequest parameter, exports of the table follow it too. A column named like a value the query selects (withCount,withSum, an alias) is sorted by that alias; code callingcount()on that query has to drop the order first (reorder()).- The chosen sorting is remembered in the browser per table. Frontend code reading
getRowsSorted()gets the rows of the database order unchanged when the database sorted them.
Editing in the table
- A
column_editablecell is no longer an input all the time. Cells show their values, a cell switches to its field by the pencil shown on its hover and the whole column by the pencil of its header, so long tables render without a form input in every row. - Every column of a field editable in the form can be switched now, not only
column_editableones.column_editablekeeps the pencil of the header visible; turn a column off withcolumn_editable:falseor thecolumns.{key}.editable => falsesetting. Columns ofreadonly,disabled,removeFromForm,inaccessibleandinvisiblefields, columns with a column component, editors,json,fileandradiofields, fields with a formcomponentorsub_componentandmultipledates are never switched. - A click on a cell of a
column_editablecolumn opens the record like any other cell, unless the cell is switched to its field.
Indexes of columns turning into JSON
admin:migratedrops every index (plain, unique, fulltext) containing a column whose type changes to JSON, before the column is changed. This happens when a field becomeslocale,multipleortype:json, and for CrudAdmin 5 locale fields still stored as varchar/text columns with JSON values (e.g.products.namewith anameindex and thefullfulltext index). MySQL can not index a JSON column, the migration failed onmodify ... jsonbefore.- The dropped indexes are not recreated. A fulltext index whose other columns stay non JSON is rebuilt by the fulltext step from the fields which still have
fulltext. Search on a localized column has to use another way (e.g. a generated column of one language).
Installation and migration output
admin:installrunsmigratebeforeadmin:migrate: a fresh Laravel 11+ project stores the cache and sessions in the database (cachetable) and failed. The Laravel users migration is removed only for an administrator model stored inusers(2014_10_12_000000_create_users_table.php);0001_01_01_000000_create_users_table.php(alsopassword_reset_tokensandsessions) stays.admin:migratelists a table as updated only when something is reported for it (added, unknown or dropped column…),-vlists every table. Scripts parsing “Updated table:” lines need-v.Localization::getJson()returns'{}'without gettext (admin.gettext.enablednottrue) or for an unknown locale; it failed on a missing language model before.