mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-02 08:19:33 -05:00
refactor: preslash simple functions
- Add pre-slash to short named functions to improve performance by almost 30% - @see https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule
This commit is contained in:
@@ -44,7 +44,7 @@ class ChatStatusController extends Controller
|
||||
{
|
||||
$chatstatuses = $this->chatRepository->statuses();
|
||||
|
||||
return view('Staff.chat.status.index', [
|
||||
return \view('Staff.chat.status.index', [
|
||||
'chatstatuses' => $chatstatuses,
|
||||
]);
|
||||
}
|
||||
@@ -63,19 +63,19 @@ class ChatStatusController extends Controller
|
||||
$chatstatus->color = $request->input('color');
|
||||
$chatstatus->icon = $request->input('icon');
|
||||
|
||||
$v = validator($chatstatus->toArray(), [
|
||||
$v = \validator($chatstatus->toArray(), [
|
||||
'name' => 'required',
|
||||
'color' => 'required',
|
||||
'icon' => 'required',
|
||||
]);
|
||||
|
||||
if ($v->fails()) {
|
||||
return redirect()->route('staff.statuses.index')
|
||||
return \redirect()->route('staff.statuses.index')
|
||||
->withErrors($v->errors());
|
||||
}
|
||||
$chatstatus->save();
|
||||
|
||||
return redirect()->route('staff.statuses.index')
|
||||
return \redirect()->route('staff.statuses.index')
|
||||
->withSuccess('Chat Status Successfully Added');
|
||||
}
|
||||
|
||||
@@ -94,19 +94,19 @@ class ChatStatusController extends Controller
|
||||
$chatstatus->color = $request->input('color');
|
||||
$chatstatus->icon = $request->input('icon');
|
||||
|
||||
$v = validator($chatstatus->toArray(), [
|
||||
$v = \validator($chatstatus->toArray(), [
|
||||
'name' => 'required',
|
||||
'color' => 'required',
|
||||
'icon' => 'required',
|
||||
]);
|
||||
|
||||
if ($v->fails()) {
|
||||
return redirect()->route('staff.statuses.index')
|
||||
return \redirect()->route('staff.statuses.index')
|
||||
->withErrors($v->errors());
|
||||
}
|
||||
$chatstatus->save();
|
||||
|
||||
return redirect()->route('staff.statuses.index')
|
||||
return \redirect()->route('staff.statuses.index')
|
||||
->withSuccess('Chat Status Successfully Modified');
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class ChatStatusController extends Controller
|
||||
$chatstatus = ChatStatus::findOrFail($id);
|
||||
$chatstatus->delete();
|
||||
|
||||
return redirect()->route('staff.statuses.index')
|
||||
return \redirect()->route('staff.statuses.index')
|
||||
->withSuccess('Chat Status Successfully Deleted');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user