mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-11 14:09:31 -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:
@@ -173,7 +173,7 @@ class RequestController extends Controller
|
||||
}
|
||||
|
||||
return to_route('requests.index')
|
||||
->withSuccess(trans('request.added-request'));
|
||||
->with('success', trans('request.added-request'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,7 +229,7 @@ class RequestController extends Controller
|
||||
}
|
||||
|
||||
return to_route('requests.show', ['torrentRequest' => $torrentRequest])
|
||||
->withSuccess(trans('request.edited-request'));
|
||||
->with('success', trans('request.edited-request'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,6 +259,6 @@ class RequestController extends Controller
|
||||
$torrentRequest->delete();
|
||||
|
||||
return to_route('requests.index')
|
||||
->withSuccess(\sprintf(trans('request.deleted'), $torrentRequest->name));
|
||||
->with('success', \sprintf(trans('request.deleted'), $torrentRequest->name));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user