mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 18:20:31 -05:00
refactor: comment controller
- Complete Dynamic Properties - Simplify If Else To Ternary
This commit is contained in:
@@ -42,6 +42,7 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class CommentController extends Controller
|
||||
{
|
||||
public $tag;
|
||||
/**
|
||||
* CommentController Constructor.
|
||||
*
|
||||
@@ -118,11 +119,7 @@ class CommentController extends Controller
|
||||
$comment
|
||||
);
|
||||
} else {
|
||||
if ($comment->anon) {
|
||||
$sender = 'Anonymous';
|
||||
} else {
|
||||
$sender = $user->username;
|
||||
}
|
||||
$sender = $comment->anon ? 'Anonymous' : $user->username;
|
||||
$this->taggedUserRepository->messageTaggedCommentUsers(
|
||||
'collection',
|
||||
$request->input('content'),
|
||||
|
||||
Reference in New Issue
Block a user