Skip to content

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Mar 20, 2025

This pull request implements a runway query scope, which allows developers to customise the queries executed by Runway.

For example: maybe you want to disable global scopes, or only return models created in the past year.

class YourModel extends Model
{
	public function scopeRunway($query)
	{
		return $query->where('something', true);
	}
}

Under the hood, all queries will now go through the Resource::newEloquentQuery() method.

Related: #669

@duncanmcclean duncanmcclean changed the title Add runway query scope [8.x] Add runway query scope Mar 20, 2025
@duncanmcclean duncanmcclean merged commit 6285530 into 8.x Mar 20, 2025
36 of 37 checks passed
@duncanmcclean duncanmcclean deleted the base-query branch March 20, 2025 11:13
@github-actions
Copy link

Released as part of v8.3.0.

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.

2 participants