(Update) Standardize Select Queries 🚀

This commit is contained in:
HDVinnie
2019-03-13 11:26:20 -04:00
parent b168fc5365
commit 8bb397c29c
23 changed files with 69 additions and 69 deletions
@@ -37,8 +37,8 @@ class ActivationController extends Controller
public function activate($token)
{
$bannedGroup = Group::where('slug', '=', 'banned')->select('id')->first();
$memberGroup = Group::where('slug', '=', 'user')->select('id')->first();
$bannedGroup = Group::select(['id'])->where('slug', '=', 'banned')->first();
$memberGroup = Group::select(['id'])->where('slug', '=', 'user')->first();
$activation = UserActivation::with('user')->where('token', '=', $token)->firstOrFail();
if ($activation->user->id && $activation->user->group->id != $bannedGroup->id) {