| @@ 36-44 (lines=9) @@ | ||
| 33 | * @param string $value |
|
| 34 | * @return string |
|
| 35 | */ |
|
| 36 | public function getCreatedByAttribute($value) |
|
| 37 | { |
|
| 38 | if ($value > 0) |
|
| 39 | if ($user = Sentinel::findUserById($value)) |
|
| 40 | if ($user != null) |
|
| 41 | return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')'; |
|
| 42 | ||
| 43 | return $value; |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * Get the user's first name. |
|
| @@ 52-60 (lines=9) @@ | ||
| 49 | * @param string $value |
|
| 50 | * @return string |
|
| 51 | */ |
|
| 52 | public function getTargetAttribute($value) |
|
| 53 | { |
|
| 54 | if ($value > 0) |
|
| 55 | if ($user = Sentinel::findUserById($value)) |
|
| 56 | if ($user != null) |
|
| 57 | return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')'; |
|
| 58 | ||
| 59 | return $value; |
|
| 60 | } |
|
| 61 | ||
| 62 | } |
|