PHP code example of joonlabs / package-modernyze

1. Go to this page and download the library: Download joonlabs/package-modernyze 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/ */

    

joonlabs / package-modernyze example snippets


use Modernyze\Facades\Modernyze;

// set up the connection
Modernyze::setUrl("https://distribution.example.com")
    ->setSecret("MY_SECRET");
    ->setToken("MY_TOKEN");

// check all products
$products = Modernyze::allProducts();

// get the latest version of a product
$latest = Modernyze::latestVersion("my-product");

// get information about a specific product version
$information = Modernyze::versionInformation("my-product", "1.0.0");

// download, verify and install this product version
Modernyze::update("my-product", "1.0.0", app_path());