mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-10 21:49:36 -06:00
refactor: swap magic RedirectResponse withX('Y') to with('X', 'Y')
Allows ctrl+clicking to access the underlying function unlike the previous magic implementation. Probably also negligibly faster.
Swapped all instances of `>withSuccess(` -> `>with('success', `, `>withWarning(` -> `>with('warning', `, and `>withInfo(` -> `>with('info', ` with ide's find and replace.
This commit is contained in:
@@ -34,7 +34,7 @@ class TicketNoteController extends Controller
|
||||
TicketNote::create(['ticket_id' => $ticket->id, 'user_id' => $user->id] + $request->validated());
|
||||
|
||||
return to_route('tickets.show', ['ticket' => $ticket])
|
||||
->withSuccess(trans('ticket.note-create-success'));
|
||||
->with('success', trans('ticket.note-create-success'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,6 +47,6 @@ class TicketNoteController extends Controller
|
||||
$ticket->notes()->delete();
|
||||
|
||||
return to_route('tickets.show', ['ticket' => $ticket])
|
||||
->withSuccess(trans('ticket.note-destroy-success'));
|
||||
->with('success', trans('ticket.note-destroy-success'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user