title: laravel 5 how to pass data to controller to model
body: <p>I am new for <code>Laravel 5</code> and learning. Now I have created login form and I want to check if user is valid(match user from table) and take some action.</p>
  
  <p>Right now I am getting all form data from <code>controller (AdminLoginController.php)</code>. Now I don't know how to pass to model for check if user is exists or not.</p>
  
  <h2>view (login.blade.php)</h2>
  
  <pre><code>//I have used this form action {{ URL::to('administrator/userAuthentication') }}
  
  &lt;form name="frmLogin" action="{{ URL::to('administrator/userAuthentication') }}" method="post"&gt;
      &lt;input name="_token" type="hidden" value="{{ csrf_token() }}"/&gt;
      &lt;div class="form-group has-feedback"&gt;
          &lt;input type="text" name="username" id="username"class="form-control" placeholder="Username"&gt;
          &lt;span class="glyphicon glyphicon-envelope form-control-feedback"&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="form-group has-feedback"&gt;
          &lt;input type="password" name="password" id="password" class="form-control" placeholder="Password"&gt;
          &lt;span class="glyphicon glyphicon-lock form-control-feedback"&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;?php /*&lt;div class="col-xs-8"&gt;
              &lt;div class="checkbox icheck"&gt;
                  &lt;label&gt;
                      &lt;input type="checkbox"&gt; Remember Me
                  &lt;/label&gt;
              &lt;/div&gt;
          &lt;/div&gt;&lt;!-- /.col --&gt;*/ ?&gt;
          &lt;div class="col-xs-4"&gt;
              &lt;button type="submit" class="btn btn-primary btn-block btn-flat"&gt;Login&lt;/button&gt;
          &lt;/div&gt;&lt;!-- /.col --&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <h2>controller (AdminLoginController.php)</h2>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  use App\Http\Requests;
  use App\Http\Controllers\Controller;
  
  class AdminLoginController extends Controller
  {
      /**
       * Handle an authentication attempt for admin user.
       *
       * @return Response
       */
      public function userAuthentication(Request $request)
      {
          echo "&lt;pre&gt;";
              return $request;
          echo "&lt;/pre&gt;";
      }
  }
  </code></pre>
  
  <p>model (AdminLoginModel.php)</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class AdminLoginModel extends Model
  {
  
      public function checkAuthentication()
      {
          // code
      }
  
  }
  </code></pre>
  
  <p>I don't know I am doing right way or not so need your suggestion.</p>
  
  <p>Thanks.</p>