1. Go to this page and download the library: Download akiraz2/yii2-blog 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/ */
akiraz2 / yii2-blog example snippets
'modules' => [
'blog' => [
'class' => akiraz2\blog\Module::class,
'urlManager' => 'urlManager',// 'urlManager' by default, or maybe you can use own component urlManagerFrontend
'imgFilePath' => '@frontend/web/img/blog/',
'imgFileUrl' => '/img/blog/',
'userModel' => \common\models\User::class,
'userPK' => 'id', //default primary key for {{%user}} table
'userName' => 'username', //uses in view (may be field `username` or `email` or `login`)
],
],
'timeZone' => 'Europe/Moscow', //time zone affect the formatter datetime format
'components' => [
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
],
],
'formatter' => [ //for the showing of date datetime
'dateFormat' => 'yyyy-MM-dd',
'datetimeFormat' => 'yyyy-MM-dd HH:mm:ss',
'decimalSeparator' => '.',
'thousandSeparator' => ' ',
'currencyCode' => 'EUR',
],
],