Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit f02bedb

Browse files
author
Alex Urucu
committed
Order template buttons by type and by name
1 parent 3f71e04 commit f02bedb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Http/Controllers/ClientsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function editClientByEmail($site, $emailAddress) {
4444
$client = new Client(['listid' => $site->id]);
4545
$client->email = $emailAddress;
4646

47-
$templates = $site->templates()->ofCategory('email')->active()->get();
47+
$templates = $site->templates()->ofCategory('email')->active()->orderBy('type')->orderBy('name')->get();
4848
$infocosts = $site->infocosts()->active()->default()->get();
4949

5050
$email = Email::fromEmail($emailAddress)->toSite($site)->orderBy('sent_at', 'desc')->first();
@@ -275,7 +275,7 @@ public function edit($site, $client, $templateCategory = 'email')
275275
}
276276
}
277277

278-
$templates = Template::active()->ofCategory($templateCategory)->ofSite($site->id)->get();
278+
$templates = Template::active()->ofCategory($templateCategory)->ofSite($site->id)->orderBy('type')->orderBy('name')->get();
279279

280280
$infocosts = $site->infocosts()->active()->default()->get();
281281

0 commit comments

Comments
 (0)