Skip to main content

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

Read more here

codenteq/laerx

132 stars
2 code files
View codenteq/laerx on GitHub

app/Services/Admin/InvoiceService.php

Open in GitHub
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,
]);
}
//
}

app/Services/Admin/CompanyInfoService.php

Open in GitHub
use App\Http\Requests\Admin\CompanyRequest;
use App\Jobs\ImageConvertJob;
use App\Models\CompanyInfo;
 
class CompanyInfoService
{
private $invoiceService;
protected $convertService;
 
public function __construct(InvoiceService $invoiceService, ImageConvertService $convertService)
{
$this->invoiceService = $invoiceService;
$this->convertService = $convertService;
}
public function store(CompanyRequest $request, $id): void
{
//
$this->invoiceService->store($request, $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.