인증 문제가 있습니다. 버전 5.1에서는 로컬에서는 잘 작동하지만 서버에서는 이상한 오류가 발생합니다. check()
함수는 항상 false를 반환하지만 인증 컨트롤러에서 디버그를했습니다. attempt()
함수에서 true를 얻었지만 check()
은 리디렉션 후에 false를 반환합니까?버전 5.1에 대한 Laravel 인증 문제
설정/auth.php :
return [
'driver' => 'eloquent',
'model' => 'App\Company',
'table' => 'company',
'password' => [
'email' => 'emails.password',
'table' => 'password_resets',
'expire' => 60,
],
];
회사 모델 클래스
<?php
namespace Testnamespace;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Route;
use Sofa\Eloquence\Eloquence;
class Company extends Model implements AuthenticatableContract, CanResetPasswordContract, SluggableInterface
{
use Authenticatable, CanResetPassword, SoftDeletes, SluggableTrait, Eloquence;
public $timestamps = true;
protected $table = 'company';
protected $dates = ['deleted_at'];
protected $fillable = [
'email',
'password',
'name',
'info',
'extra_info',
'phone',
'mobile',
'street',
'postal_code',
'website',
'facebook',
'newsletter'
];
protected $sluggable = [
'build_from' => 'name',
'save_to' => 'slug',
];
protected $searchableColumns = ['name'];
protected $primaryKey = 'id';
}
어떤 도움이 appriciated됩니다
...
오류 메시지가 무엇입니까? –
오류 메시지가 없지만 auth :: check() 함수가 false를 반환합니다. –
config/auth.php 및 config/session.php를 제외한 다른 구성이 필요합니까 ?? –