title: Getting a value from a text box in laravel 5.8
body: <p>I can,t get the textbox value to a variable from the form</p>
  
  <p>I have tried almost every option possible to get this right but nothing worked</p>
  
  <blockquote>
    <p>search.blade.php</p>
  </blockquote>
  
  <pre><code>@extends('layouts.app')
      @section('content')
  
      &lt;form action="/student/searchshow" method="POST" role="search"&gt;
      {{ csrf_field() }}
          &lt;div class="input-group"&gt;
          &lt;input class="form-control" type="text" name="name" placeholder="Search" aria-label="Search"&gt; 
  
                  &lt;a href="{{url('student/search/')}}" class="btn btn-default"&gt;search&lt;/a&gt;  
  
          &lt;/div&gt;   
       &lt;/form&gt;
      @stop
  </code></pre>
  
  <blockquote>
    <p>StudentController.php</p>
  </blockquote>
  
  <pre><code>&lt;?php
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\student;//to access the views in student
  use Illuminate\Support\Facades\Input;
  
  class StudentController extends Controller
  {
    public function searchshow()
    {
      return view('student.search');
     }
  
   public function search()
      {
        $name = Input::get('name');
  
         dd($name);
      }   
  }
  </code></pre>
  
  <blockquote>
    <p>web.php</p>
  </blockquote>
  
  <pre><code>&lt;?php
  Route::get('/', function () {
      return view('welcome');
  });
  
  Route::get('student/searchshow', 'StudentController@searchshow');
  
  Route::post('student/search', 'StudentController@search');
  </code></pre>
  
  <p>when i try to get the value to a variable from the form(search.blade.php) it always gives the result null</p>