public static function removeBlock($template, $user) { $blocker = static::where(['template' => $template, 'user_id' => $user->id])->orWhere(['template' => $template, 'email' => $user->email])->get(); if (!$blocker->count()) { return false; } $blocker->each(function ($block) { $block->delete(); }); return true; }