---
title: "Discussion on \"The if-statement you've written 400 times\n\" | Hashnode"
description: "Discussion on \"The if-statement you've written 400 times\n\". Be honest. You've typed this exact block in every project you've ever shipped:\n$user = User::where('email', $email)->first();\n\nif ($user) {\n    $user->update(['name' => $name, 'plan' => $plan]);\n} els"
url: "https://hashnode.com/posts/the-if-statement-you-ve-written-400-times/6a760566252a8c840bad4f94"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The if-statement you've written 400 times](https://nodenuggets.hashnode.dev/the-if-statement-you-ve-written-400-times?utm_source=hashnode&utm_medium=feed)

Be honest. You've typed this exact block in every project you've ever shipped: $user = User::where('email', $email)->first(); if ($user) { $user->update(\['name' => $name, 'plan' => $plan\]); } els

Aug 7 · 2 min read · nodenuggets.hashnode.dev  
Read the article

## Written by

[Catherine Kimani](https://hashnode.com/@CodeWithCatherine)

@CodeWithCatherine · Kenya,Nairobi

  
[View profile](https://hashnode.com/@CodeWithCatherine)

Building and Learning, One Line of Code at a Time

Developer with a passion for coding. I enjoy creating impactful applications and exploring new technologies. Let's embark on this coding adventure together, building innovative solutions along the way

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
