mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-03 00:40:12 -05:00
refactor: if / else / elseif statements
- Change If Else Value Assign To Early Return - Change Nested Ifs To Early Return - Remove Always Else
This commit is contained in:
@@ -62,12 +62,10 @@ class SeedboxController extends Controller
|
||||
if ($v->fails()) {
|
||||
return redirect()->route('seedboxes.index', ['username' => $user->username])
|
||||
->withErrors($v->errors());
|
||||
} else {
|
||||
$seedbox->save();
|
||||
|
||||
return redirect()->route('seedboxes.index', ['username' => $user->username])
|
||||
->withSuccess('Seedbox Has Been Successfully Added!');
|
||||
}
|
||||
$seedbox->save();
|
||||
return redirect()->route('seedboxes.index', ['username' => $user->username])
|
||||
->withSuccess('Seedbox Has Been Successfully Added!');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user