Files
monica/app/Models/UserToken.php
T
2022-09-13 22:18:25 +02:00

62 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class UserToken extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<string>
*/
protected $fillable = [
'user_id',
'driver',
'driver_id',
'email',
'format',
'token',
'token_secret',
'refresh_token',
'expires_in',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array<int, string>
*/
protected $hidden = [
'token',
'token_secret',
'refresh_token',
];
/**
* The attributes that should be visible in serialization.
*
* @var array<int, string>
*/
protected $visible = [
'driver',
'email',
'format',
];
/**
* Get the user record associated with the company.
*
* @return BelongsTo
*/
public function user()
{
return $this->belongsTo(User::class);
}
}