mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 09:20:21 -05:00
chore: streamline query builder orderBy calls with asc and desc arguments
This commit is contained in:
@@ -138,7 +138,7 @@ class Comment extends Model
|
||||
public static function checkForStale(Ticket $ticket): void
|
||||
{
|
||||
if (empty($ticket->reminded_at) || \strtotime($ticket->reminded_at) < \strtotime('+ 3 days')) {
|
||||
$last_comment = $ticket->comments()->orderBy('id', 'desc')->first();
|
||||
$last_comment = $ticket->comments()->orderByDesc('id')->first();
|
||||
|
||||
if (\property_exists($last_comment, 'id') && $last_comment->id !== null && ! $last_comment->user->is_modo && \strtotime($last_comment->created_at) < \strtotime('- 3 days')) {
|
||||
\event(new TicketWentStale($last_comment->ticket));
|
||||
|
||||
Reference in New Issue
Block a user