title: How to validate credentials in laravel 5 for logging in features?
body: <p>I am new to Laravel and I am using tutorial for web app. Tutorial uses Laravel 4 whereas I am using Laravel 5. I solved register issue but when I set down to test for login following errors shown up:</p>
  
  <blockquote>
    <p>ErrorException in EloquentUserProvider.php line 111: Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\user given, called in C:\Users\Pujan\Desktop\projectlaravel\vendor\laravel\framework\src\Illuminate\Auth\Guard.php on line 390 and defined.</p>
  </blockquote>
  
  <p>I'm not able to figure out the issue here. What actually means credentials. I know Laravel 5 has inbuilt login features but couldn't use it so I tried out different ways but this problem out of my focus.
  My usercontroller is:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  use App\Http\Requests;
  use App\Http\Controllers\Controller;
  use View;
  
  use App\user;
  use Input;
  use App\Http\Requests\YourFormRequest;
  use Auth;
  //use Illuminate\Support\Facades\Auth;
  
  class UserController extends Controller
  {
  
      public $restful = true;
  
      public function index()
      {
  
          return View::make('users.new')-&gt;with('title', 'Make it snappy Q&amp;A - Register');
      }
  
  
      public function create(YourFormRequest $request)
      {
          User::create($request-&gt;all());
  
          return redirect('/')-&gt;with('message','Thanks for registering!');
      }
  
      public function getlogin()
      {
         // return \Auth::user();
          return View::make('users.login')-&gt;with('title','Make it snappy Q&amp;A - Login ');
      }
  
      public function createlogin()
      {
          $user = array(
              'username'=&gt;Input::get('username'),
              'password'=&gt;Input::get('password')
              );
          if (Auth::attempt($user))
          {
              return redirect('/')-&gt;with('message','You are logged in:');
          }else{
              return redirect('login')
              -&gt;with('message','Your username or password are incorrect pls chk it out')
              -&gt;with_input();
          }
      }
  </code></pre>
  
  <p>I have my routes:</p>
  
  <pre><code>Route::get('/','Questions@index');
  Route::get('register','UserController@index');
  Route::get('login','UserController@getlogin');
  Route::post('register','UserController@create');
  Route::post('login','UserController@createlogin');
  </code></pre>
  
  <p>My login layout is working properly but as I try to login above errors show up. I think this error belongs to inbuilt Laravel 5 features but I am not able to match the setting inbuilt and my created login functionality.</p>