mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-01 07:52:00 -05: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:
@@ -51,7 +51,7 @@ class DistributorController extends Controller
|
||||
Distributor::create($request->validated());
|
||||
|
||||
return to_route('staff.distributors.index')
|
||||
->withSuccess('Distributor Successfully Added');
|
||||
->with('success', 'Distributor Successfully Added');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ class DistributorController extends Controller
|
||||
$distributor->update($request->validated());
|
||||
|
||||
return to_route('staff.distributors.index')
|
||||
->withSuccess('Distributor Successfully Modified');
|
||||
->with('success', 'Distributor Successfully Modified');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,6 +97,6 @@ class DistributorController extends Controller
|
||||
$distributor->delete();
|
||||
|
||||
return to_route('staff.distributors.index')
|
||||
->withSuccess('Distributor Successfully Deleted');
|
||||
->with('success', 'Distributor Successfully Deleted');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user