Skip to content

QueryBuilder multiply and divide support #3373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from

Conversation

faissaloux
Copy link

Hello 👋🏻

In this PR I have added multiply and divide to QueryBuilder .

Usage

DB::table('users')->where('name', 'John Doe')->multiply('salary');    // "salary" * 1
DB::table('users')->where('name', 'John Doe')->multiply('salary', 2); // "salary" * 2
DB::table('users')->where('name', 'John Doe')->divide('salary');      // "salary" / 1
DB::table('users')->where('name', 'John Doe')->divide('salary', 2);   // "salary" / 2

Checklist

  • Add tests and ensure they pass

@faissaloux faissaloux requested a review from a team as a code owner April 26, 2025 21:23
@faissaloux faissaloux requested a review from GromNaN April 26, 2025 21:23
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