vormiaphp/vormia
Vormia is a lightweight PHP/Laravel package offering a simple foundation for building apps with clean structure and reusable components. It focuses on straightforward setup and developer-friendly conventions for organizing code and speeding up common tasks.
All notable changes to the Vormia package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
vormia:migrate-api-routes — focused production command to clear route/config caches, enable VORMIA_REGISTER_API_ROUTES, remove duplicate /api/v1 Vormia auth routes from the host routes/api.php, and update the Postman collection after upgrading/api/v1/* to /api/vrm/* so all Vormia API routes share one prefix and no longer conflict with host-app /api/v1 versioningMediaForge::url($pathOrUrl, $disk = null) now returns a builder that can generate:
->public()->private() (prefers temporaryUrl() when supported)->seconds(), ->minutes(), ->hours(), ->days(), ->years(), and ->expiresAt(...)VORMIA_MEDIAFORGE_PREVIEW_PERIOD (seconds)
86400 (24h)VORMIA_MEDIAFORGE_PREVIEW_PERIOD=): defaults to 3600 (1h)MediaForge::upload(...)->run() and MediaForge::uploadFile(...)->run() now return a storage path/key by default (instead of sometimes returning a URL).vormia:install): now includes
VORMIA_MEDIAFORGE_STORAGE_RULE=vormiaVORMIA_MEDIAFORGE_PREVIEW_PERIOD=86400MediaForge::previewUrl(...) remains as a compatibility wrapper, implemented via the URL builder.Removing style.scss among imported files
This document contains human-friendly release notes for tagged versions of this package.
aiguide/) are organized by topic: Inertia.js guides under aiguide/inertia/, Livewire under aiguide/livewire/, and experimental tracks under aiguide/beta/. Root-level “from scratch” Markdown guides remain at the top of aiguide/.aiguide/inertia/inertiajs-operations.md describes adapter-agnostic behavior (Laravel, visits, Blade root, middleware, forms, testing pointers). Stack-specific React → Inertia guides stay as .mdc files next to it.README.md AI guide links and the “See also” note now target these paths; aiguide/README.md is the canonical index inside the folder..mdc files and the new operations doc into aiguide/inertia/.aiguide/livewire/.aiguide/beta/.references/react-laravel.mdc path in favor of the in-repo Livewire Volt inline guide.composer require vormiaphp/vormia:^5.5
php artisan vormia:install
# Inertia frontend (no prompts):
# php artisan vormia:install --stack=inertia --no-interaction
MediaForge::upload(...)->run() and MediaForge::uploadFile(...)->run() now return a path/key (e.g. uploads/products/2026/04/17/abc.webp) instead of sometimes returning a URL.
MediaForge::url($pathOrUrl, $disk = null) now returns a builder (string-castable):
MediaForge::url($path)->public()MediaForge::url($path)->private() (uses temporaryUrl() when supported)->seconds(), ->minutes(), ->hours(), ->days(), ->years(), or ->expiresAt(...)VORMIA_MEDIAFORGE_PREVIEW_PERIOD (seconds)
VORMIA_MEDIAFORGE_PREVIEW_PERIOD=): defaults to 3600 (1h)php artisan vormia:install):
VORMIA_MEDIAFORGE_STORAGE_RULE=vormiaVORMIA_MEDIAFORGE_PREVIEW_PERIOD=86400MediaForge::previewUrl(...) remains available as a compatibility helper (internally uses the builder).composer require vormiaphp/vormia:^5.4
php artisan vormia:install
MediaForge::upload(...)->run() and MediaForge::uploadFile(...)->run() now return a path/key (e.g. uploads/products/2026/04/17/abc.webp) instead of sometimes returning a URL.
MediaForge::url($pathOrUrl, $disk = null) now returns a builder (string-castable):
MediaForge::url($path)->public()MediaForge::url($path)->private() (uses temporaryUrl() when supported)->seconds(), ->minutes(), ->hours(), ->days(), ->years(), or ->expiresAt(...)VORMIA_MEDIAFORGE_PREVIEW_PERIOD (seconds)
VORMIA_MEDIAFORGE_PREVIEW_PERIOD=): defaults to 3600 (1h)php artisan vormia:install):
VORMIA_MEDIAFORGE_STORAGE_RULE=vormiaVORMIA_MEDIAFORGE_PREVIEW_PERIOD=86400MediaForge::previewUrl(...) remains available as a compatibility helper (internally uses the builder).composer require vormiaphp/vormia:^5.4
php artisan vormia:install
All notable changes to the Vormia package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
uploadFile() for uploading raw files (PDFs, docs, zips, etc.) without image processingupload() with an isFile() flag to treat uploads as raw files and skip image operationsMediaForge::url($urlOrPath, $disk = null) to normalize a MediaForge run() return value (URL-or-path) into a usable URL when possibleMediaForge::previewUrl($urlOrPath, $disk = null, $expiresAt = null, array $options = []) to generate previewable URLs, including signed temporary URLs when supported by the diskVORMIA_MEDIAFORGE_PREVIEW_MODE=proxy, Vormia exposes GET /api/vrm/media/preview?disk=...&path=... to stream files for previewing from disks that don’t support url()/temporaryUrl() reliablyVORMIA_MEDIAFORGE_URL_PASSTHROUGH controls whether MediaForge::url() returns existing http(s)/data: inputs unchangedYYYY/MM/DD folder structure via useDateFolders()v5.1.3 with improved two-factor migration guidancebootstrap/app.php and bootstrap/providers.phpVORMIA_* from .env and .env.exampleresources/css/app.css and resources/js/app.jsvrm_*)optimize:clear--force to skip confirmation promptsrc/stubs/ directory from Composer autoloadingApp\ namespaces meant for Laravel applicationsClass src\stubs\Controllers\... does not comply with psr-4 autoloading standardexclude-from-classmap to composer.json autoload section
database/seeders during package installation and updatesvormia:install commandvormia:update command#5a85b9)keepAspectRatio parameter: Control whether thumbnails maintain aspect ratio or use exact dimensionsfromOriginal parameter: Choose to generate thumbnails from original uploaded image or processed imagefillColor parameter: Fill empty areas with background color when aspect ratio is maintainedVORMIA_MEDIAFORGE_THUMBNAIL_KEEP_ASPECT_RATIO (default: true)VORMIA_MEDIAFORGE_THUMBNAIL_FROM_ORIGINAL (default: false){baseName}-{width}-{height}.{extension}{baseName}-{width}-{height}-{format}.{format}{baseName}_{suffix}.{extension}override=falsefromOriginal parameter to correctly use original uploaded file instead of processed imageApiAuthenticate middleware with 'api-auth' alias for protected API routesclearCache(), fresh() methods to UtilityService for better performancesetMeta/getMeta methods across User and Taxonomy models for consistencyUtilitiesServiceProvider, GlobalDataServiceProvider, and TokenServiceProvider with database connection checksInstallCommand to include new middleware aliases automaticallysetMeta/setMetaValue methodsMediaForgeDependencyTest and InstallationTestWhen adding new entries to this changelog, please follow the established format and include:
MediaForge::url(): helper to turn either a URL or a storage path/key into something safe to use in <img src="..."> when possible.
VORMIA_MEDIAFORGE_STORAGE_RULE, VORMIA_MEDIAFORGE_DISK, and VORMIA_MEDIAFORGE_URL_PASSTHROUGH.MediaForge::previewUrl(): helper to generate a browser-previewable URL for a MediaForge output.
temporaryUrl() when available and configured to prefer private previews.VORMIA_MEDIAFORGE_PREVIEW_MODE (auto|public|private|proxy)VORMIA_MEDIAFORGE_PREVIEW_EXPIRES_MINUTESVORMIA_MEDIAFORGE_PREVIEW_MODE=proxy, Vormia enables:
GET /api/vrm/media/preview?disk={disk}&path={path}404 if proxy mode is not enabled).composer require vormiaphp/vormia:^5.2
This document contains human-friendly release notes for tagged versions of this package.
vormia:install is resilient when two-factor columns already exist on users (Fortify, Breeze, or an earlier migration) and when php artisan install:api would otherwise publish a duplicate two-factor migration.TwoFactorMigrationNormalizer (src/Console/Support/TwoFactorMigrationNormalizer.php): runs automatically during vormia:install—before the kit’s migrate, and again before install:api. It finds migrations in database/migrations whose names include two_factor and user, and replaces unconditional Schema::table('users') adds with idempotent Schema::hasColumn checks for two_factor_secret, two_factor_recovery_codes, and two_factor_confirmed_at.installSanctum(): skips php artisan install:api when users.two_factor_secret already exists; installs Sanctum via composer require laravel/sanctum and publishes SanctumServiceProvider (including personal_access_tokens migration when missing).two_factor_* column errors from install:api, the installer re-runs the normalizer, runs migrate --force, then finishes Sanctum setup if Sanctum is still missing.install:api is invoked with --no-interaction for predictable scripted installs.vormia:install only.composer require vormiaphp/vormia:^5.1
php artisan vormia:install again so the normalizer can rewrite unsafe migrations before migrate runs.database/migrations/, then run php artisan migrate.User example is aligned with Vormia traits and migrations.examples/User.php with a file-level guide for integrating HasVormiaRoles (roles, permissions, and composed HasUserMeta) and HasSlugs (registry-backed slugs).$fillable / $hidden and added fields that match the Vormia users migration (username, phone, provider, provider_id, avatar), plus SoftDeletes and phone_verified_at casting.slug attribute via Attribute::get() so route generation and serialization stay consistent with findBySlug() / resolveRouteBinding().isMember() (role check by slug member) and tightened return types on slug-related methods.composer require vormiaphp/vormia:^5.1
match syntax issue in NotificationService.match arm for the INFO notification type that could trigger a parse error (unexpected token "default", expecting "=>").composer require vormiaphp/vormia:^5.1
composer.lock with composer.json after dependency updates./.phpunit.cache/.composer require vormiaphp/vormia:^5.1
composer validate --strict
composer test
This document contains human-friendly release notes for tagged versions of this package.
User example is aligned with Vormia traits and migrations.examples/User.php with a file-level guide for integrating HasVormiaRoles (roles, permissions, and composed HasUserMeta) and HasSlugs (registry-backed slugs).$fillable / $hidden and added fields that match the Vormia users migration (username, phone, provider, provider_id, avatar), plus SoftDeletes and phone_verified_at casting.slug attribute via Attribute::get() so route generation and serialization stay consistent with findBySlug() / resolveRouteBinding().isMember() (role check by slug member) and tightened return types on slug-related methods.composer require vormiaphp/vormia:^5.1
match syntax issue in NotificationService.match arm for the INFO notification type that could trigger a parse error (unexpected token "default", expecting "=>").composer require vormiaphp/vormia:^5.1
composer.lock with composer.json after dependency updates./.phpunit.cache/.composer require vormiaphp/vormia:^5.1
composer validate --strict
composer test
This document contains human-friendly release notes for tagged versions of this package.
match syntax issue in NotificationService.match arm for the INFO notification type that could trigger a parse error (unexpected token "default", expecting "=>").composer require vormiaphp/vormia:^5.1
composer.lock with composer.json after dependency updates./.phpunit.cache/.composer require vormiaphp/vormia:^5.1
composer validate --strict
composer test
This document contains human-friendly release notes for tagged versions of this package.
composer.lock with composer.json after dependency updates./.phpunit.cache/.composer require vormiaphp/vormia:^5.1
composer validate --strict
composer test
Support Laravel 13
We fixed the plugin codebase path for App.js and App.css
Package: vormiaphp/vormia
Description: A comprehensive Laravel package for user management, roles, permissions, and utilities.
aiguide/react-to-laravel-livewire-inline.mdc is aligned with Livewire 4 patterns and best practices.vormia:uninstall — New Artisan command to fully remove Vormia from an application:
bootstrap/app.php and bootstrap/providers.phpVORMIA_* from .env and .env.exampleresources/css/app.css and resources/js/app.jsvrm_*)optimize:clear--force to skip the confirmation prompt| Version | Focus |
|---|---|
| 5.0.x | Laravel 12, vormia:uninstall, docs/guides |
| 4.5.x | MediaForge enhancements, RoleSeeder, PSR-4 |
| 4.2.8 | API auth middleware, AI docs, robustness |
For a full, version-by-version history, see CHANGELOG.md.
Laravel 12 Support (as of March 1, 2026)
Overview
This patch release fixes PSR-4 autoloading compliance warnings that occurred when Composer scanned stub files during autoload generation.
What's Fixed
PSR-4 Autoloading Compliance
Resolved PSR-4 autoloading warnings for stub files in the package
Excluded src/stubs/ directory from Composer autoloading
Stub files are template files with App\ namespaces intended for Laravel applications
These files should not be autoloaded from the package itself
Resolved Warnings:
Class src\stubs\Controllers\Api\v1\AuthLoginController does not comply with psr-4 autoloading standard
Class src/stubs/Controllers\Vrm\PermissionController does not comply with psr-4 autoloading standard
Class src\stubs\Controllers\Vrm\RoleController does not comply with psr-4 autoloading standard
Class src\stubs\Controllers\Vrm\UserRoleController does not comply with psr-4 autoloading standard
database/seeders during package installation and updatesvormia:install commandvormia:update commandThis release brings significant improvements to the MediaForge image processing service, including advanced thumbnail controls, background fill color support, and critical bug fixes.
Resize operations now support background fill color when maintaining aspect ratio. This creates exact dimensions with the image centered on a colored background, perfect for product images and thumbnails.
use App\Facades\Vrm\MediaForge;
// Resize with background fill color
$imageUrl = MediaForge::upload($file)
->to('products')
->resize(606, 606, true, '#5a85b9') // Creates exact 606x606 with #5a85b9 background
->run();
How it works:
Thumbnail generation now offers full control over aspect ratio, source image selection, and fill color:
// Thumbnail with all controls
$imageUrl = MediaForge::upload($file)
->to('products')
->resize(606, 606, true, '#5a85b9')
->thumbnail(
[[500, 500, 'thumb'], [400, 267, 'featured'], [400, 300, 'product']],
true, // keepAspectRatio: true = maintain, false = exact dimensions
false, // fromOriginal: false = from processed, true = from original uploaded
'#ffffff' // fillColor: fill empty areas when aspect ratio maintained
)
->run();
New Parameters:
keepAspectRatio (bool|null): Control whether thumbnails maintain aspect ratio or use exact dimensionsfromOriginal (bool|null): Choose to generate from original uploaded image or processed imagefillColor (string|null): Fill empty areas with background color when aspect ratio is maintainedNew environment variables for thumbnail defaults:
VORMIA_MEDIAFORGE_THUMBNAIL_KEEP_ASPECT_RATIO=true
VORMIA_MEDIAFORGE_THUMBNAIL_FROM_ORIGINAL=false
These can be overridden per-call or set globally via .env file.
All processed images now follow predictable naming patterns:
Resize only: {baseName}-{width}-{height}.{extension}
abc123-606-606.jpgResize + Convert: {baseName}-{width}-{height}-{format}.{format}
abc123-606-606-webp.webpThumbnails: {baseName}_{suffix}.{extension}
abc123-606-606_thumb.webpFixed: Resize operations were saving to the wrong directory (public root) when override=false. Now all files are correctly saved to the specified ->to('products') directory.
Fixed: Background fill color was hiding the entire image. Now properly creates a canvas with the fill color and places the resized image on top (centered), making the image visible with colored background.
Fixed: The fromOriginal parameter now correctly uses the original uploaded file instead of the processed image, regardless of previous resize/convert operations.
Fixed: Return values now correctly reflect the actual file names after resize and convert operations, following the consistent naming patterns.
Fixed: Resize operations now produce exactly the specified dimensions (e.g., 606x606) when background fill color is provided, instead of maintaining aspect ratio without fill.
This release is backward compatible. Existing code will continue to work, but you can now take advantage of the new features.
Update your package:
composer update vormiaphp/vormia
(Optional) Add new environment variables to your .env:
VORMIA_MEDIAFORGE_THUMBNAIL_KEEP_ASPECT_RATIO=true
VORMIA_MEDIAFORGE_THUMBNAIL_FROM_ORIGINAL=false
Run the install command to update configuration:
php artisan vormia:install
Example: Resize with Background Fill
// Old way (still works)
$imageUrl = MediaForge::upload($file)
->to('products')
->resize(606, 606)
->run();
// New way with background fill
$imageUrl = MediaForge::upload($file)
->to('products')
->resize(606, 606, true, '#5a85b9') // Adds background fill
->run();
Example: Advanced Thumbnails
// Old way (still works)
$imageUrl = MediaForge::upload($file)
->to('products')
->thumbnail([[500, 500, 'thumb']])
->run();
// New way with full control
$imageUrl = MediaForge::upload($file)
->to('products')
->thumbnail(
[[500, 500, 'thumb']],
true, // keepAspectRatio
true, // fromOriginal
'#ffffff' // fillColor
)
->run();
See CHANGELOG.md for complete list of changes.
Thank you for using Vormia! If you encounter any issues or have suggestions, please open an issue on GitHub.
Release Date: January 15, 2025
Version: 4.5.0
Compatibility: Laravel 12+, PHP 8.2+
This release introduces a completely automated installation experience, eliminating manual steps and streamlining the Vormia setup process. Installation now handles everything from dependencies to frontend assets automatically.
php artisan vormia:install handles everythingresources/css/plugins and resources/js/pluginsphp artisan install:apiphp artisan config:publish cors--api flag: API support is now always included by defaultphp artisan vormia:installSimply run: composer require vormiaphp/vormia php artisan vormia:installEverything is now automated!
If you're upgrading from v4.3.x or earlier:
Update the package:
composer update vormiaphp/vormia 2. Re-run installation (if needed): php artisan vormia:update 3. Install npm packages (if not already installed): npm install jquery flatpickr select2 sweetalert2 4. Install dependencies (if not already installed): composer require intervention/image php artisan install:api php artisan config:publish cors
--api flag: The --api flag is no longer available. API support is always included by default.HasApiTokens trait to your User model for API authenticationThank you for using Vormia! 🎉
ApiAuthenticate middleware with 'api-auth' alias for protected API routesLLMFLOW.md and LLMRULES.md guides for AI assistants and developersclearCache(), fresh() methods to UtilityService for better performancesetMeta/getMeta methods across User and Taxonomy models for consistencyUtilitiesServiceProvider, GlobalDataServiceProvider, and TokenServiceProvider with database connection checksInstallCommand to include new middleware aliases automaticallysetMeta/setMetaValue methodsMediaForgeDependencyTest and InstallationTestFull Changelog: https://github.com/vormiaphp/vormia/compare/v4.2.7...v4.2.9
Solving slug issues while trying to get the slug from the list of Data.
Slug Management Updated This allows for ease of access and updating slug
Full Changelog: https://github.com/vormiaphp/vormia/compare/v4.2.5...v4.2.6
The package is stable for use, and major problems have been solved.
Apart from the above features, you can start using the package for bootstrapping your projects.
However a piolot use is current in test
The command created an error during installation
Bug for release tag corrected. The package has no Bugs
A comprehensive Laravel development package that streamlines common web application functionalities. Built with Laravel best practices and designed for maintainability and scalability.
Total Package rewrite and upgrades, now stable for production use.
Full Changelog: https://github.com/vormiaphp/vormia/compare/v4.1.0...v4.1.1
This version introduces new way of handling every procces and documentation to support the packages
A minor update to allow custom names on thumbnails.
A bug that was preventing email view templates from being copied during installation has been fixed.
How can I help you explore Laravel packages today?