You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
819 B
PHP
43 lines
819 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable; // Para usar login
|
|
use Laravel\Sanctum\HasApiTokens; // Para tokens API
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
class Postulante extends Authenticatable
|
|
{
|
|
use HasApiTokens, HasFactory, Notifiable;
|
|
|
|
protected $table = 'postulantes';
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'email',
|
|
'password',
|
|
'dni',
|
|
'device_id',
|
|
'last_activity'
|
|
];
|
|
|
|
|
|
protected $hidden = [
|
|
'password',
|
|
'device_id',
|
|
'tokens'
|
|
];
|
|
|
|
|
|
protected $casts = [
|
|
'last_activity' => 'datetime',
|
|
];
|
|
|
|
|
|
public function setPasswordAttribute($value)
|
|
{
|
|
$this->attributes['password'] = bcrypt($value);
|
|
}
|
|
}
|