'date:Y-m-d', ]; /** * Get the user that this token belongs to. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the default expiry value for an API token. * Set to 100 years from now. */ public static function defaultExpiry(): string { return Carbon::now()->addYears(100)->format('Y-m-d'); } /** * {@inheritdoc} */ public function logDescriptor(): string { return "({$this->id}) {$this->name}; User: {$this->user->logDescriptor()}"; } }