1 <?php namespace BookStack\Api;
3 use BookStack\Auth\User;
4 use Illuminate\Database\Eloquent\Model;
5 use Illuminate\Database\Eloquent\Relations\BelongsTo;
7 class ApiToken extends Model
9 protected $fillable = ['name', 'expires_at'];
11 'expires_at' => 'date:Y-m-d'
15 * Get the user that this token belongs to.
17 public function user(): BelongsTo
19 return $this->belongsTo(User::class);