mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
25 lines
603 B
PHP
25 lines
603 B
PHP
<?php
|
|
|
|
namespace InvoiceShelf\Http\Controllers\V1\Admin\Estimate;
|
|
|
|
use InvoiceShelf\Http\Controllers\Controller;
|
|
use InvoiceShelf\Http\Requests\SendEstimatesRequest;
|
|
use InvoiceShelf\Models\Estimate;
|
|
|
|
class SendEstimateController extends Controller
|
|
{
|
|
/**
|
|
* Handle the incoming request.
|
|
*
|
|
* @return \Illuminate\Http\JsonResponse
|
|
*/
|
|
public function __invoke(SendEstimatesRequest $request, Estimate $estimate)
|
|
{
|
|
$this->authorize('send estimate', $estimate);
|
|
|
|
$response = $estimate->send($request->all());
|
|
|
|
return response()->json($response);
|
|
}
|
|
}
|