mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-08 22:14:48 +00:00
Setup pint & run code style fix
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
|
||||
namespace InvoiceShelf\Http\Controllers\V1\Customer\Estimate;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use InvoiceShelf\Http\Controllers\Controller;
|
||||
use InvoiceShelf\Http\Resources\Customer\EstimateResource;
|
||||
use InvoiceShelf\Models\Company;
|
||||
use InvoiceShelf\Models\Estimate;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class EstimatesController extends Controller
|
||||
{
|
||||
@@ -21,11 +21,11 @@ class EstimatesController extends Controller
|
||||
$limit = $request->has('limit') ? $request->limit : 10;
|
||||
|
||||
$estimates = Estimate::with([
|
||||
'items',
|
||||
'customer',
|
||||
'taxes',
|
||||
'creator',
|
||||
])
|
||||
'items',
|
||||
'customer',
|
||||
'taxes',
|
||||
'creator',
|
||||
])
|
||||
->where('status', '<>', 'DRAFT')
|
||||
->whereCustomer(Auth::guard('customer')->id())
|
||||
->applyFilters($request->only([
|
||||
@@ -39,7 +39,7 @@ class EstimatesController extends Controller
|
||||
->latest()
|
||||
->paginateData($limit);
|
||||
|
||||
return (EstimateResource::collection($estimates))
|
||||
return EstimateResource::collection($estimates)
|
||||
->additional(['meta' => [
|
||||
'estimateTotalCount' => Estimate::where('status', '<>', 'DRAFT')->whereCustomer(Auth::guard('customer')->id())->count(),
|
||||
]]);
|
||||
@@ -48,7 +48,7 @@ class EstimatesController extends Controller
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Estimate $estimate
|
||||
* @param Estimate $estimate
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Company $company, $id)
|
||||
|
||||
Reference in New Issue
Block a user