title: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'My_database_Name.posts' doesn't exist
body: <p>I tried to generate CRUD for User table.
  when I tried to validate request data i got Error in validation section.</p>
  
  <blockquote>
    <p>Illuminate \ Database \ QueryException (42S02) SQLSTATE[42S02]: Base
    table or view not found: 1146 Table 'My_database_Name.posts' doesn't
    exist (SQL: select count(*) as aggregate from <code>posts</code> where
    <code>usr_email</code> = testingadmin@test.com) Previous exceptions</p>
  
  <pre><code>SQLSTATE[42S02]: Base table or view not found: 1146 Table 'My_database_name.posts' doesn't exist (42S02)
  </code></pre>
  </blockquote>
  
  <p>If I remove validation part the code work fine for me.</p>
  
  <p>Thanks.</p>
  
  <p>My Controller's  update() code is </p>
  
  <blockquote>
  <pre><code>public function update( Request $request ,$user)
      {
          $request-&gt;validate([
              'usr_first_name' =&gt; 'required',
              'usr_last_name' =&gt; 'required',
              'usr_email' =&gt; 'required|unique:posts',
              'usr_phone' =&gt; 'required|numeric|min:2|max:5',
              'usr_address' =&gt; 'required',
              'usr_type' =&gt; 'required',
          ]);
          $user = User::where('id', $user)-&gt;first();
  
          $user-&gt;firstname    = $request-&gt;input('usr_first_name');
          $user-&gt;lastname     = $request-&gt;input('usr_last_name');
          $user-&gt;email        = $request-&gt;input('usr_email');
          $user-&gt;phone        = $request-&gt;input('usr_phone');
          $user-&gt;address      = $request-&gt;input('usr_address');
          $user-&gt;type         = $request-&gt;input('usr_type');
          $user-&gt;save();
  
          return redirect()-&gt;action('UserController@index');
      }
  </code></pre>
  </blockquote>