EloquentUserProvider.php行114中的ErrorException:传递参数1以照亮\Auth\EloquentUserProvider::validateCredentials

EloquentUserProvider.php行114中的ErrorException:传递参数1以照亮\Auth\EloquentUserProvider::validateCredentials,php,laravel-5.3,Php,Laravel 5.3,我正试图在助手的帮助下验证我的用户 为此,我在应用程序目录中设置了makehelper文件夹。将以下代码行添加到composer.json "files": [ "app/Helpers/UserHelper.php" ], 在App\Provider目录中创建HelperServiceProvider.php,并在其中使用以下代码 <?php namespace App\Providers; use Illuminate\Supp

我正试图在助手的帮助下验证我的用户 为此,我在应用程序目录中设置了makehelper文件夹。将以下代码行添加到composer.json

    "files": [
        "app/Helpers/UserHelper.php"
    ],
在App\Provider目录中创建HelperServiceProvider.php,并在其中使用以下代码

    <?php
    namespace App\Providers;
    use Illuminate\Support\ServiceProvider;

    class HelperServiceProvider extends ServiceProvider
    {
    /**
    * Bootstrap any application services.
    *
    * @return void
    */
    public function boot()
    {
    //
    }

    /**
    * Register any application services.
    *
    * @return void
    */
    public function register()
    {
    foreach (glob(app_path().'/Helpers/*.php') as $filename){
       require_once($filename);
    }

    }
    } 
我的用户模型是

   <?php

   namespace App;

   use Illuminate\Database\Eloquent\Model;

   class User extends Model {
   protected $table='users';
   protected $fillable =['username', 'password', 'firstname', 'lastname', 'email', 'phone', 'groupname', 'about', 'image'];

   public static $login = [
   'username' => 'required|',
   'email' => 'required|',
   'password' => 'required'
   ];
   }
这是我的用户助手

  <?php namespace App\Helpers;
  use Illuminate\Support\Facades\Auth;
  class UserHelper {
   public static function processLogin($inputs){
    if(Auth::attempt($inputs)){
        return TRUE;
    } else {
        return FALSE;
      }
     }
   }
这是我的登录功能

    <?php

    namespace App\Http\Controllers;
    use App\User;
    use Input;
    use Illuminate\Support\Facades\Validator as Validator;

    use App\Helpers\UserHelper;


    class LoginController extends Controller
    {
    public function login() {

    $inputs = Input::except('_token');
        $validator = Validator::make($inputs, User::$login);

             if($validator->fails()){
                    print_r($validator->errors()->first());
        } else {
          $respones = \UserHelper::processLogin($inputs);

       if($respones){
            return 'loginView';
            } else {
            return 'not a user of our DB';
           } 
         }
       }
    }
我还更新了我的作曲家,在我登录到应用程序后出现以下错误,我正在搜索这最后5个小时的帮助


Reards

签出此..网站现在已关闭:无yaar workingclass用户扩展模型不在此扩展模型使用Authclass用户扩展Authenticatable并使用此行使用Illumb\Foundation\Auth\User作为Authenticatable;
In your code you are extending the  class User extends Model but when you are using auth functionality in laravel you need  to extend the auth rather than model..

Keep  Illuminate\Foundation\Auth\User and extends the model like this...

class User extends Authenticatable{
 //code here 
}
In your code you are extending the  class User extends Model but when you are using auth functionality in laravel you need  to extend the auth rather than model..

Keep  Illuminate\Foundation\Auth\User and extends the model like this...

class User extends Authenticatable{
 //code here 
}