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
PHTML

2 months ago
<?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'
];
2 months ago
2 months ago
protected $hidden = [
'password',
'device_id',
'tokens'
];
2 months ago
2 months ago
protected $casts = [
'last_activity' => 'datetime',
];
2 months ago
2 months ago
public function setPasswordAttribute($value)
{
$this->attributes['password'] = bcrypt($value);
}
}