Build a tax dropdown for further usage.

This commit is contained in:
2024-12-11 12:51:10 +01:00
parent 6f70849621
commit 644adad9c3
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace App\View\Composers;
use App\Models\Taxrate;
use Illuminate\View\View;
class TaxDropdown
{
public function compose(View $view): void
{
$standard = Taxrate::where('active', true)->first();
$view->with(['tax_rates' => TaxRate::all(), 'standard' => $standard->rate]);
}
}