1. Go to this page and download the library: Download ervinne/nw-cms-version 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/ */
ervinne / nw-cms-version example snippets
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
Ervinne\CMSVersion\Commands\GenerateCMSVersionMigrations::class
];
$bannerSet = new BannerSet();
$bannerSet->version_id = $request->version_id; // assumes the version comes from the request
$bannerSet->label = $request->label;
$bannerSet->images_json = $request->banners;
$bannerSet->is_published = $request->is_published;
$bannerSet->saveWithVersion();