Skip to content

Return static to allow extending Trend - #91

Open
m-stilling wants to merge 1 commit into
Flowframe:masterfrom
m-stilling:feature/return-static
Open

m-stilling wants to merge 1 commit into
Flowframe:masterfrom
m-stilling:feature/return-static

Conversation

@m-stilling

Copy link
Copy Markdown

I've extended Trend to add some extra functionality, but ran into issues due to this. My temporary workaround was to overwrite the query() method in my own class, and call my custom methods first.

class MyTrend extends Trend {
	public static function query(Builder $builder): static {
		return new static($builder);
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant