laravel 5.2 - check if field is empty or not
<p>I want to check if some field is empty or not. If is empty, the user can update the profile without change the current password.
If is not empty, store new value of password. My controller is:</p>

<pre><code>public function storeUpdatedUser(Request $request)
{
    $this-&gt;validate($request, ['email' =&gt; 'required', 'name' =&gt; 'required', 'surname' =&gt; 'required', ]);

    $user = User::findOrFail(Auth::user()-&gt;id);
    $user-&gt;update($request-&gt;all());
    $new_password = false;

    if($new_password != ""){
        $new_password = bcrypt($request-&gt;new_password);
        $user-&gt;password = $new_password;
    }

    $user-&gt;save();
    Session::flash('flash_message', 'User updated!');

    return redirect('/');           
}
</code></pre>

<p>but dont work, no password change if I put some value 
image explain better
<a href="https://i.stack.imgur.com/NdUgs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NdUgs.png" alt="enter image description here"></a></p>