@@ 75-84 (lines=10) @@ | ||
72 | * |
|
73 | * @return string |
|
74 | */ |
|
75 | public function getCreatedByNameAttribute() |
|
76 | { |
|
77 | if ($this->{$this->getCreatedByColumn()}) { |
|
78 | $user = $this->getUserInstance()->find($this->{$this->getCreatedByColumn()}); |
|
79 | ||
80 | return $user->first_name . ' ' . $user->last_name; |
|
81 | } |
|
82 | ||
83 | return ''; |
|
84 | } |
|
85 | ||
86 | /** |
|
87 | * Get Laravel's user class instance. |
|
@@ 103-112 (lines=10) @@ | ||
100 | * |
|
101 | * @return string |
|
102 | */ |
|
103 | public function getUpdatedByNameAttribute() |
|
104 | { |
|
105 | if ($this->{$this->getUpdatedByColumn()}) { |
|
106 | $user = $this->getUserInstance()->find($this->{$this->getUpdatedByColumn()}); |
|
107 | ||
108 | return $user->first_name . ' ' . $user->last_name; |
|
109 | } |
|
110 | ||
111 | return ''; |
|
112 | } |
|
113 | ||
114 | /** |
|
115 | * Query scope to limit results to own records. |