Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

bytefury/crater

8213 stars
1 code files
View bytefury/crater on GitHub

app/Models/Tax.php

Open in GitHub
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
 
class Tax extends Model
{
//
public function scopeTaxAttributes($query)
{
$query->select(
DB::raw('sum(amount) as total_tax_amount, tax_type_id')
)->groupBy('tax_type_id');
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.