Streamit Laravel - Documentation

Mandatory Pre-Update Steps for Web

Instructions

This major update introduces database schema changes and media structure changes.
Skipping any of the steps below may result in permanent data loss.

Step 1 – Take a Full Backup (Mandatory)

Before starting the update, take a complete backup of:

  • Old code zip
  • Database
  • Uploaded media directory

⚠️ Do not proceed without verified backups.

Step 2 – Replace Application Files (Breaking Change)

Upload and replace the new version files over your existing Streamit Web installation.

  • This is a breaking major update
  • Replace the entire old code with the new updated code

Step 3 – Temporarily Comment the Protection Code

On your server, open the following file:

Path:
/app/Providers/AppServiceProvider.php

Find the code below in AppServiceProvider.php file:

Event::listen(CommandStarting::class, function (CommandStarting $event) {
if ((dbConnectionStatus() && Schema::hasTable('users') && file_exists(storage_path('installed')) )) {
if (in_array($event->command, ['migrate:fresh', 'db:wipe', 'db:seed'])) {
throw new \Exception("❌ Command '{$event->command}' is blocked in production.");
}
}
});

👉 Comment this code temporarily (do NOT delete it).

        //Event::listen(CommandStarting::class, function (CommandStarting $event) {
// if ((dbConnectionStatus() && Schema::hasTable('users') && file_exists(storage_path('installed')) )) {
// if (in_array($event->command, ['migrate:fresh', 'db:wipe', 'db:seed'])) {
// throw new \Exception("❌ Command '{$event->command}' is blocked in production.");
// }
// }
// });

After commenting it, proceed with Step 4 and Step 5 commands in your terminal.

⚠️ Important:
Once Step 4 and Step 5 are completed successfully, you must uncomment this code again.

Note:
This protection code is added to prevent browser bots from automatically triggering commands like dummy data or other functions on some customer browsers.
Please do not forget to uncomment it, as it is important for security and stability.

Step 4 – Run Database Migrations

Execute the following command to apply required schema changes:

php artisan migrate 

⚠️ Do not continue if this command fails.

Step 5 – Organize Existing Media Files

This release introduces a new media directory structure.

Run the following command to migrate existing media files:

php artisan media:organize

This command moves old media files into the new public/pictures structure used by the updated version.

👉 After completing Step 4 and Step 5, uncomment the code from Step 3 again.

⚠️ Note: If images are still not displaying after following Step 5
If you have followed Step 5 and images are still not displaying (only default images are shown), you will need to unlink the existing image storage link and recreate it again by following the steps below.

1. Navigate to the public directory and rename the existing storage symlink to

storage-old

2. Recreate the storage symlink by running the following command:

php artisan storage:link

After completing these steps, the image storage link will be refreshed and images should display correctly.

Step 6 – Verify System

After completing the above steps:

  • Clear application cache
  • Log in to the admin panel
  • Verify media, content, and playback

Important Notice

This update modifies internal file structures and database schemas.
Applying this update without proper backups or by skipping steps can permanently damage your installation.