Archived
Optimise invoice data requests #56
This commit is contained in:
1 parent
d3b6371105
commit
6d67d3d6cd
14 files changed
+308
-972
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user