1. Go to this page and download the library: Download yiimaker/yii2-data-static 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/ */
yiimaker / yii2-data-static example snippets
class AboutUs extends ymaker\data\statics\StaticData
{
public $phone;
public $email;
public function rules()
{
return [
[['phone', 'email'], '
/**
* change language for model
* @param $language string language code
* @param bool $reload If true, then all attributes will be overwritten
*/
public function changeLanguage($language, $reload = true);