title: Laravel 5 Search Not Working as expected
body: <p>I`m new to the Laravel 5.4.i wanted to developed search when i enter id number need to fetch service from the database called new.but according to this code it is not functioning.it just show all the services without the exact value related to its id.All i want is if i enter id 1 ..i need to fetch out service related to id=1 and display it in search.blade.phpplease help me!</p>
  
  <p>Here Is my Search.blade.php</p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
  &lt;html lang="{{ config('app.locale') }}"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
          &lt;title&gt;Laravel&lt;/title&gt;
  
          &lt;!-- Fonts --&gt;
          &lt;link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"&gt;
  
          &lt;!-- Styles --&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
         &lt;form action="search" method="post"&gt;
         &lt;label&gt;Search by Id!&lt;/label&gt;&lt;br&gt;
         &lt;input type="text" name="Search" /&gt;&lt;br&gt;
         &lt;input type="hidden" value="{{ csrf_token() }}" name="_token" /&gt;
         &lt;input type="submit" name="submit" value="Search"&gt;
         &lt;/form&gt;
  
  
  
          &lt;table class="table table-bordered table-hover" &gt;
  
              &lt;thead&gt;
                  &lt;th&gt;Name&lt;/th&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  @foreach($customers as $customer)
  
                      &lt;td&gt;{{ $customer-&gt;service }}&lt;/td&gt;
  
                  @endforeach
              &lt;/tbody&gt;   
          &lt;/table&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my Controller UserController</p>
  
  <p>public function search_code(Request $request){</p>
  
  <pre><code>    $query = $request-&gt;search;
      $customers = DB::table('news')-&gt;where('id', 'LIKE',"%$query%")-&gt;get();
       return view('search' , compact('search', 'customers'));
  
      }
  </code></pre>
  
  <p>Here Is My Route </p>
  
  <pre><code>Route::post('search', 'UserController@search_code');
  </code></pre>