app/Services/Admin/InvoiceService.php
use App\Http\Requests\Admin\CompanyRequest;use App\Models\Invoice;use Carbon\Carbon; class InvoiceService{ // public function store(CompanyRequest $request, $id) : void { Invoice::create([ 'price' => $this->price, 'start_date' => $request->start_date, 'end_date' => Carbon::create($request->start_date)->addMonths($this->month), 'packageId' => $this->packageId, 'companyId' => $id, ]); } //}