A Laravel package for managing platform versions and showing what's new to users
laravelplus/version-platform-manager is a Laravel package for a laravel package for managing platform versions and showing what's new to users.
It currently has 0 GitHub stars and 420 downloads on Packagist (latest version v1.0.3).
Install it with composer require laravelplus/version-platform-manager.
Discover more Laravel packages by laravelplus
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel package for managing platform versions and showing "what's new" content to users based on their current version.
composer require laravelplus/version-platform-manager
php artisan vendor:publish --provider="LaravelPlus\VersionPlatformManager\Providers\VersionPlatformManagerServiceProvider"
php artisan migrate
The package automatically handles version checking and modal display. Simply include the component in your views:
<x-what-is-new></x-what-is-new>
Add a new platform version:
use LaravelPlus\VersionPlatformManager\Models\PlatformVersion;
PlatformVersion::create([
'version' => '1.0.0',
'title' => 'Major Update',
'description' => 'New features and improvements',
'is_active' => true,
'released_at' => now(),
]);
Add content for a specific version:
use LaravelPlus\VersionPlatformManager\Models\WhatsNew;
WhatsNew::create([
'platform_version_id' => $version->id,
'title' => 'New Feature',
'content' => 'Description of the new feature',
'type' => 'feature', // feature, improvement, bugfix, security
'is_active' => true,
]);
Check if a user needs to see updates:
use LaravelPlus\VersionPlatformManager\Services\VersionService;
$versionService = app(VersionService::class);
$needsUpdate = $versionService->userNeedsUpdate($user);
The package configuration file config/version-platform-manager.php contains:
The admin sidebar is fully configurable via the navbar_links array in config/version-platform-manager.php.
You can add, remove, or reorder links. Each link supports:
label: The text to displayroute: (optional) The Laravel route name to useurl: (optional) A direct URL (internal or external)icon: (optional) SVG icon markuptarget: (optional) e.g. _blank to open in a new tabExample:
'navbar_links' => [
[
'label' => 'Dashboard',
'route' => 'version-manager.dashboard',
'icon' => '<svg ...></svg>',
],
[
'label' => 'Logs',
'url' => '/admin/logs',
'icon' => '<svg ...></svg>',
'target' => '_blank', // open in new tab
],
// Add more links as needed
],
route and url are present, route is used.icon field.Stores platform version information:
version: Version string (e.g., "1.0.0")title: Version titledescription: Version descriptionis_active: Whether the version is activereleased_at: Release dateStores feature announcements:
platform_version_id: Reference to platform versiontitle: Feature titlecontent: Feature descriptiontype: Feature type (feature, improvement, bugfix, security)is_active: Whether the feature is activeTracks user version information:
user_id: User referenceversion: User's current versionlast_seen_version: Last version the user has seenupdated_at: Last update timestampThe package provides a Blade component that automatically shows the modal when needed:
<x-what-is-new></x-what-is-new>
Admin components for managing versions and content:
<x-version-platform-manager::admin.versions></x-version-platform-manager::admin.versions>
<x-version-platform-manager::admin.whats-new></x-version-platform-manager::admin.whats-new>
Main service for version management:
$versionService = app(VersionService::class);
// Check if user needs update
$needsUpdate = $versionService->userNeedsUpdate($user);
// Get user's current version
$version = $versionService->getUserVersion($user);
// Update user version
$versionService->updateUserVersion($user, '1.0.0');
// Get what's new for user
$whatsNew = $versionService->getWhatsNewForUser($user);
The package fires several events:
UserVersionUpdated: When a user's version is updatedPlatformVersionCreated: When a new platform version is createdWhatsNewCreated: When new content is addedPlease see CONTRIBUTING.md for details.
The MIT License (MIT). Please see License File for more information.