PHP code example of kkosmider / lunarphp-omnibus
1. Go to this page and download the library: Download kkosmider/lunarphp-omnibus 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/ */
kkosmider / lunarphp-omnibus example snippets
use Kkosmider\Omnibus\Traits\HasHistoricalPrices;
class ProductVariant extends \Lunar\Models\ProductVariant
{
use HasHistoricalPrices;
}
$variant = ProductVariant::find(1);
$lowestPrice = $variant->getHistoricalLowestPrice();
$variantHistoricalPrices = $variant->historicalPrices()->get();
bash
php artisan vendor:publish --tag=omnibus.migrations
bash
php artisan vendor:publish --tag=omnibus.config