Skip to content

Commit

Permalink
兼容旧日志的path
Browse files Browse the repository at this point in the history
  • Loading branch information
ichynul committed Sep 18, 2023
1 parent bbeb414 commit 83c2560
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/admin/model/AdminOperationLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ public function action()
{
return $this->belongsTo(AdminPermission::class, 'path', 'url');
}

public function getPathAttr($value, $data)
{
return '/' . ltrim($value, '/'); //兼容旧的数据
}
}

0 comments on commit 83c2560

Please sign in to comment.