*/ abstract public function defaults(): array; /** * @param array $overwrites * @return array */ public function attributes(?array $overwrites = []): array { $defaults = collect($this->defaults()); foreach ($overwrites as $key => $value) { $defaults->put($key, $value); } return $defaults->toArray(); } }