Commit 47559a4b49b8e8f4c7af99bb41d9533d10cd95bd

Authored by Yarik
1 parent b3e1a425

test

Showing 2 changed files with 11 additions and 13 deletions   Show diff stats
common/models/User.php
... ... @@ -337,21 +337,19 @@
337 337 {
338 338 return true;
339 339 }
340   - public function getCompanyInfo(){
341   - return $this->hasOne(CompanyInfo::className(), ['user_id' => 'id']);
342   - }
343 340  
344   - public function getLiveTime(){
  341 + public function getCompanyInfo()
  342 + {
  343 + return $this->hasOne(CompanyInfo::className(), [ 'user_id' => 'id' ]);
  344 + }
345 345  
346   - $now = new \DateTime('now');
347   - $date1 = new \DateTime(date ('Y-m-d H:i:s',$this->created_at));
348   - return \Yii::$app->formatter->asRelativeTime($date1->diff($now));
349   - }
  346 + public function getLiveTime()
  347 + {
350 348  
351   - public function getIsPerformer()
352   - {
353   - return true;
354   - }
  349 + $now = new \DateTime('now');
  350 + $date1 = new \DateTime(date('Y-m-d H:i:s', $this->created_at));
  351 + return \Yii::$app->formatter->asRelativeTime($date1->diff($now));
  352 + }
355 353  
356 354 public function getIsCustomer()
357 355 {
... ...
frontend/views/accounts/team.php
... ... @@ -43,7 +43,7 @@
43 43 'value' => function($model, $key, $index, $column) {
44 44 return \Yii::$app->formatter->asDate(time(), 'yyyy') - $model->experience_from;
45 45 },
46   - 'label' => 'Опыл, лет',
  46 + 'label' => 'Опыт, лет',
47 47 ],
48 48 'team_id',
49 49 'user_id',
... ...