Skip to content

Commit

Permalink
improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Mar 1, 2025
1 parent 7b65213 commit f655641
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Admin/LogicalServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function index()
{
abort_if(Gate::denies('logical_server_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');

$logicalServers = LogicalServer::with('applications', 'servers', 'cluster')->orderBy('name')->get();
$logicalServers = LogicalServer::with('applications:id,name', 'servers:id,name', 'cluster:id,name')->orderBy('name')->get();

return view('admin.logicalServers.index', compact('logicalServers'));
}
Expand Down
6 changes: 5 additions & 1 deletion app/Http/Controllers/Admin/MApplicationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ public function index()
{
abort_if(Gate::denies('m_application_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');

$applications = MApplication::with('application_block', 'entity_resp', 'entities', 'processes')
$applications = MApplication::with(
'application_block:id,name',
'entity_resp:id,name',
'entities:id,name',
'processes:id,name')
->orderBy('name')->get();

return view('admin.applications.index', compact('applications'));
Expand Down
4 changes: 2 additions & 2 deletions resources/views/test.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function testDateParsing($dateString) {
// Exemple de chaînes de date à tester
$dateStrings = [
'2023/10/05',
'2025/02/28',
'2023/10/05 11:23:00',
'2025/02/28 02:12:11',
'2021/02/01',
];
Expand Down

0 comments on commit f655641

Please sign in to comment.