title: Laravel profile update with e-mail unique:users
body: <p>I'm new in Laravel. I try to make profile update page... all works good but if I try to apply rule to set email field unique:users I have problem when user try to update for example name and don't want change email.</p>
  <pre class="lang-php prettyprint-override"><code>public function rules()
  {
      return [
          'name' =&gt; 'required|max:255',
          'email' =&gt; 'required|email|max:255|unique:users',
      ];
  }
  </code></pre>
  <p>I want restrict that user to use the same e-mail that someone else is using... but I want to ignore that if this is the same e-mail already in that user profile and he don't want to change that.</p>
  <pre class="lang-php prettyprint-override"><code>public function updateData(UpdateDataRequest $request)
  {
      DB::table('users')
          -&gt;where('id', Auth::user()-&gt;id)
          -&gt;update(array('email' =&gt; $request-&gt;email, 'name' =&gt; $request-&gt;name));
  
      return redirect('panel');
  }
  </code></pre>
  <p>How to do it right?</p>