refactor: closure to arrow function

This commit is contained in:
HDVinnie
2020-04-14 20:38:48 -04:00
parent 46aa876c06
commit ea2a12be15
23 changed files with 145 additions and 353 deletions
@@ -75,12 +75,8 @@ class MassActionController extends Controller
*/
public function update()
{
$validating_group = cache()->rememberForever('validating_group', function () {
return Group::where('slug', '=', 'validating')->pluck('id');
});
$member_group = cache()->rememberForever('member_group', function () {
return Group::where('slug', '=', 'user')->pluck('id');
});
$validating_group = cache()->rememberForever('validating_group', fn() => Group::where('slug', '=', 'validating')->pluck('id'));
$member_group = cache()->rememberForever('member_group', fn() => Group::where('slug', '=', 'user')->pluck('id'));
$users = User::where('group_id', '=', $validating_group[0])->get();
foreach ($users as $user) {