I have issue of authentication. In version 5.1 it's working fine in local but on server getting weird error. check()
function always return false but I had debug in authentication controller I got the true in attempt()
function but why check()
return false after redirection?
config/auth.php:
return [
'driver' => 'eloquent',
'model' => 'App\Company',
'table' => 'company',
'password' => [
'email' => 'emails.password',
'table' => 'password_resets',
'expire' => 60,
],
];
Company model class
<?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';
}
Any help will be appriciate...
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire