1
0
forked from s421507/eOSP2
eOSP2/app/Uzytkownik.php
2019-07-11 23:55:51 +02:00

50 lines
963 B
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Uzytkownik extends Authenticatable
{
//
const CREATED_AT = 'CreationDate';
const UPDATED_AT = 'ChangeDate';
protected $primaryKey = 'ID';
protected $table = 'User';
protected $fillable = array(
'login',
'password',
'name',
'surname',
'PESEL',
'phoneNumber',
'email',
'fireStationID',
'functionID',
'degreeID',
'number',
'statusId',
'deleted',
'creatorId',
'creationDate',
'changingId',
'changeDate'
);
protected $casts = [
'CreationDate' => 'datetime',
];
protected $hidden = [
'password', 'remember_token',
];
public function setPasswordAttribute($password)
{
$this->attributes['password'] = bcrypt($password);
}
}