'bool', ]; /** * @inheritdoc */ public function sluggable(): array { return ['slug' => ['source' => 'username']]; } /** * Get the User's goals. */ public function goals(): HasMany { return $this->hasMany(Goal::class); } /** * Get the User's journal entries. */ public function journalEntries(): HasMany { return $this->hasMany(JournalEntry::class); } /** * Get User's past, present, and future goals. * * @todo Refactor or remove as needed. * * @return \Illuminate\Support\Collection[] */ public function getGoalsByTime(?Carbon $date = null): array { return ['past' => new Collection(), 'present' => new Collection(), 'future' => new Collection()]; } /** * Defines conversions for the User image. * * @throws \Spatie\Image\Exceptions\InvalidManipulation * * @see https://spatie.be/docs/laravel-medialibrary/v9/converting-images/defining-conversions */ public function registerMediaConversions(Media $media = null): void { $this->addMediaConversion('icon') ->width(300) ->height(300) ->sharpen(10) ->optimize(); } }