mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 11:14:06 +00:00
Consolidate single-action controllers into resource controllers
Merge 11 single-action controllers into their parent resource controllers: - Invoice: send, sendPreview, clone, changeStatus -> InvoicesController - Estimate: send, sendPreview, clone, convertToInvoice, changeStatus -> EstimatesController - Payment: send, sendPreview -> PaymentsController Extract clone and convert business logic from controllers into services: - InvoiceService: add clone(), changeStatus() - EstimateService: add clone(), convertToInvoice(), changeStatus() Previously this logic was inlined in controllers (~80-90 lines each).
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\V1\Admin\Estimate\EstimatesController;
|
||||
use App\Http\Controllers\V1\Admin\Estimate\SendEstimateController;
|
||||
use App\Http\Requests\DeleteEstimatesRequest;
|
||||
use App\Http\Requests\EstimatesRequest;
|
||||
use App\Http\Requests\SendEstimatesRequest;
|
||||
@@ -156,8 +155,8 @@ test('search estimates', function () {
|
||||
|
||||
test('send estimate using a form request', function () {
|
||||
$this->assertActionUsesFormRequest(
|
||||
SendEstimateController::class,
|
||||
'__invoke',
|
||||
EstimatesController::class,
|
||||
'send',
|
||||
SendEstimatesRequest::class
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user