Login should work again. Problem was in non-setting sessions. This was resolved by adding middleware "web" to admin group. Thanks to great documentation for NOT MENTIONING this pitfall!
43 lines
967 B
PHP
43 lines
967 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Auth\Authenticatable;
|
|
use Illuminate\Auth\Passwords\CanResetPassword;
|
|
use Illuminate\Contracts\Auth\Authenticatable as AuthenticableInterface;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Foundation\Auth\Access\Authorizable;
|
|
|
|
/**
|
|
* Class User
|
|
*/
|
|
class User extends Model implements AuthenticableInterface
|
|
{
|
|
use Authenticatable, Authorizable;
|
|
|
|
public $timestamps = false;
|
|
protected $fillable = [
|
|
'email',
|
|
'username',
|
|
'password',
|
|
'name',
|
|
];
|
|
protected $guarded = [];
|
|
/**
|
|
* The attributes excluded from the model's JSON form.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $hidden = [
|
|
'password',
|
|
'remember_token',
|
|
];
|
|
|
|
const STATE_DELETED = 'deleted';
|
|
const STATE_BLOCKED = 'blocked';
|
|
const STATE_ACTIVE = 'active';
|
|
const ROLE_VISITOR = 'visitor';
|
|
const ROLE_EDITOR = 'editor';
|
|
const ROLE_ADMIN = 'admin';
|
|
}
|