1. Go to this page and download the library: Download simplecms/dynamic_unit 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/ */
simplecms / dynamic_unit example snippets
use \SimpleCMS\DynamicUnit\Traits\DynamicAttributeTrait;
use SimpleCMS\DynamicUnit\Facades\DynamicUnit;
DynamicUnit::getAll(); //Get all parameters
DynamicUnit::findByCode(string $code); //Find by code
DynamicUnit::findListByCode(string $code); //Get attribute options
DynamicUnit::createUnit(array<{name|code|items},int|string|array<{name|code|file},int|string|UploadedFile>> $array); //Create dynamic unit
DynamicUnit::updateUnit(int $id,array<{name|code|items},int|string|array<{id|dynamic_unit_id|name|code|file},int|string|UploadedFile>> $array); //Update dynamic unit
DynamicUnit::deleteUnit(int $id); //Delete dynamic unit
DynamicUnit::createAttribute(array<{dynamic_unit_id|name|code|file},int|string|UploadedFile> $array); //Create dynamic unit value
DynamicUnit::updateAttribute(int $id,array<{dynamic_unit_id|name|code|file},int|string|UploadedFile> $array); //Update dynamic unit value
DynamicUnit::deleteAttribute(int $id); //Delete dynamic unit value
use SimpleService;
//Add dynamic unit value query
$service->queryAttribute(array $codes)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.