Как убрать ошибку, показанную ниже:(рамки laravel)

Я уже просмотрел много документов. Я пытаюсь войти в систему, но она не работает. Показаны ошибки. Я не знаю причину. Я очень новичок в Laravel

Это код моего контроллера

    public function do_login()
    {
        $credentials = [
        'username'=>Input::get('username'),
        'password'=>Input::get('password')
    ]; 
    $rules = [
        'username' => 'required',
        'password'=>'required'
    ];

    //validating the credentials.
    $validator = Validator::make($credentials,$rules);

    //in case the credentials are valid. Try to login the user.
    if($validator->passes())
    {
        if (Auth::attempt($credentials))
        {
            //if successfull redirect the user 
            return Redirect::to('home');
        }
        else
        {
            //else send back the login failure message.
            return Redirect::back()->withInput()->with('failure','username or password is invalid!');
        } 
    }
    else
    {
        //send back the validation errors.
         return Redirect::back()->withErrors($validator)->withInput();
    }

}      

это мой код модели:

    <?php namespace LARAVEL\laravel_1st_project\models\UserModel;

    use Illuminate\Auth\UserInterface;
    use Illuminate\Auth\Reminders\RemindableInterface;

    class UserModel extends \Eloquent implements UserInterface , RemindableInterface
    {
        public $table = "user";
        protected $primaryKey = 'employee_id';

        //public $timestamps = false;
    }

это мое приложение \config\auth.php:

  'model' => 'LARAVEL\laravel_1st_project\UserModel',   

  'table' => 'user',

'reminder' => array(

    'email' => 'email.auth.reminder',

    'table' => 'password_reminders',

    'expire' => 60,

),

Ошибка: и, наконец, это ошибка, с которой все еще сталкиваются

0 ответов

Другие вопросы по тегам