Skip to content

Upgrade to Laravel 13 and move from Laravel Mix to Vite - #132

Merged
rbruhn merged 1 commit into
developmentfrom
upgrade/laravel-13-vite
Nov 1, 2026
Merged

rbruhn merged 1 commit into
developmentfrom
upgrade/laravel-13-vite

Conversation

@rbruhn

@rbruhn rbruhn commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Upgrades Digitization Academy to Laravel 13 and replaces Laravel Mix with Vite.

Laravel 13

  • laravel/framework ^13.0 (13.39.0), plus minor package updates. Every package resolves on 13.
  • The Filament panel uses PreventRequestForgery, Laravel 13's new name for VerifyCsrfToken.
  • Moves to the Laravel 11+ layout:
    • Providers are listed in bootstrap/providers.php instead of config/app.php.
    • The api and broadcast channel routes load from bootstrap/app.php.
    • The old Auth, Broadcast, Event and Route service providers and the unused app/Http/Middleware classes are removed.
    • The Super Admin gate moves to AppServiceProvider, and Fortify's home is '/admin'.
  • Bug fix: SendEmailVerificationNotification was registered twice on Registered (the old EventServiceProvider plus the framework's), so new users got two verification emails. It's registered once now.
  • No session or cache behaviour change: config/session.php and config/cache.php don't set serialization or serializable_classes, so Laravel 13 keeps the old defaults (no forced logouts). The response cache stores JSON.

Vite

  • vite.config.js replaces webpack.mix.js. The scripts are now yarn dev and yarn build.
  • Blade loads assets with @vite and Vite::asset(). All images under resources/images are versioned in public/build.
  • Isotope and imagesLoaded come from npm (isotope-layout, imagesloaded, jquery-bridget) as jQuery plugins, because Vite 8 can't bundle the vendored minified copies. lodash (unused) and the separate postcss dependency are removed.
  • The reCAPTCHA partial's script waits for DOMContentLoaded, because Vite's module script is deferred.

Dependencies and security

Deploy

  • CI builds with yarn build and fails if public/build/manifest.json is missing.
  • public/build ships with each release instead of being shared, so a rollback also rolls back the assets.
  • public/css, js, fonts, images, svg and mix-manifest.json are no longer shared; Filament republishes its own files on each deploy. Neither database has links to /images/, /css/, /js/, /fonts/ or /svg/.
  • After the first successful deploy to each server, those old folders under shared/ can be deleted.

Testing

  • Pest: 52 passed, 2 skipped. Pint is clean.
  • config:cache, route:cache, view:cache and event:cache all succeed.
  • Checked locally in the browser: the home, catalog, team, contact and login pages load with no console errors and no broken images. Font Awesome loads, and the accordion and mobile menu work.
  • Not checked: the Filament admin while signed in, and yarn dev hot reload.

When this reaches main, put [major] in the merge commit message so the release gets a major version bump.

Laravel 13
- laravel/framework ^13.0 (13.39.0), with minor package updates
- Filament panel uses PreventRequestForgery, the new name of VerifyCsrfToken
- Providers move to bootstrap/providers.php; api and broadcast channel routes
  load from bootstrap/app.php
- Remove the pre-Laravel 11 Auth, Broadcast, Event and Route service providers
  and the unused app/Http/Middleware classes; the Super Admin gate moves to
  AppServiceProvider and Fortify's home is '/admin'
- Fixes duplicate verification emails: SendEmailVerificationNotification was
  registered on Registered twice (the old EventServiceProvider and the framework's)

Vite
- vite.config.js replaces webpack.mix.js; yarn dev / yarn build
- Blade loads assets with @Vite and Vite::asset(); images are versioned in public/build
- Isotope and imagesLoaded come from npm as jQuery plugins instead of vendored
  bundles; lodash and the separate postcss dependency are removed
- The reCAPTCHA script waits for DOMContentLoaded, since the module script is deferred
- Removes laravel-mix/webpack and with them every open npm security alert
  (webpack-dev-server, webpack-dev-middleware, uuid, elliptic); yarn audit is clean

Deploy
- CI builds with yarn build and checks for the Vite manifest
- public/build ships with each release; public/css, js, fonts, images, svg and
  mix-manifest.json are no longer shared (the database has no links to them)

Supersedes Dependabot #130 (laravel/framework 13.39.0) and #131 (axios 1.21.0, postcss).
@rbruhn
rbruhn merged commit b3318fb into development Nov 1, 2026
2 checks passed
@rbruhn
rbruhn deleted the upgrade/laravel-13-vite branch November 1, 2026 17:01
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