E
E
Evgeny Kuznetsov2016-04-21 20:56:52
Laravel
Evgeny Kuznetsov, 2016-04-21 20:56:52

Laravel 5.2 standard login/authentication throws an error, what could be?

It gives out like this:


FatalErrorException in User.php line 31:
App\User and Illuminate\Database\Eloquent\Model define the same property ($hidden) in the composition of App\User. However, the definition differs and is considered incompatible. Class was composed

Judging by a Google search, I'm the only one :)
UPD: User.php model code
Didn't touch anything
<?php

namespace App;

use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    
    use Authenticatable;
    
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2016-04-21
@evgentus

use Authenticatable;
Remove.
Where is it from anyway?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question