Optimise invoice data requests #56

This commit is contained in:
2025-11-18 10:27:49 +01:00
parent 387c3be93a
commit 93f7871c18
14 changed files with 308 additions and 972 deletions
+9 -1
View File
@@ -2,12 +2,20 @@
namespace App\Http\Controllers;
use Inertia\Inertia;
use App\Models\Customer;
use App\Support\ApiDataTransformer;
use Illuminate\Support\Facades\Storage;
class CustomerController extends Controller
{
public function show()
{
return Inertia::render('Customers', [
'customersData' => $this->index()
]);
}
public function index()
{
$customers = Customer::with(['contacts' => function ($query) {