PHP code example of rabarvp1 / self-updater

1. Go to this page and download the library: Download rabarvp1/self-updater library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rabarvp1 / self-updater example snippets


Schema::create('system_updates', function (Blueprint $table) {
    $table->id();
    $table->string('version');
    $table->string('user_price')->default('0');
    $table->string('version_price')->default('0');
    $table->timestamp('applied_at')->nullable();
});

use Snawbar\SelfUpdater\Services\UpdateCheckService;

public function index(UpdateCheckService $updateCheck)
{
    $updateData = $updateCheck->check();
    
    return view('dashboard.index', compact('updateData'));
}
bash
php artisan vendor:publish --tag="self-updater-config"