'json' ]; /*** * Notes: 所属分类 * * @Author: 玄尘 * @Date: 2021/12/1 9:57 * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function category(): BelongsTo { return $this->belongsTo(Category::class); } /** * Notes: 所属科室 * * @Author: 玄尘 * @Date: 2021/12/1 9:58 * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function group(): BelongsTo { return $this->belongsTo(ResumeGroup::class); } /** * Notes: 跳转链接 * * @Author: 玄尘 * @Date: 2021/12/1 13:11 * @return string */ public function getLinkAttribute(): string { return route('resume.show', $this); } /** * Notes: 获取基础数据 * * @Author: 玄尘 * @Date: 2021/12/1 13:11 * @param $key * @param string $default */ public function getInformation($key, string $default = '') { return Arr::get($this->information, $key, $default); } }