Ensure the right order
[MAILPOET-1480]
This commit is contained in:
@ -31,8 +31,9 @@ class NewsletterTemplates extends APIEndpoint {
|
||||
function getAll() {
|
||||
$collection = NewsletterTemplate
|
||||
::selectExpr('id, categories, thumbnail, name, description, readonly')
|
||||
->orderByAsc('readonly')
|
||||
->orderByDesc('created_at')
|
||||
->orderByAsc('name')
|
||||
->orderByDesc('id')
|
||||
->findMany();
|
||||
$templates = array_map(function($item) {
|
||||
return $item->asArray();
|
||||
|
@ -35,43 +35,46 @@ class Populator {
|
||||
'NewsletterBlank12Column',
|
||||
'NewsletterBlank121Column',
|
||||
'NewsletterBlank13Column',
|
||||
'PostNotificationsBlank1Column',
|
||||
'WelcomeBlank1Column',
|
||||
'WelcomeBlank12Column',
|
||||
'SimpleText',
|
||||
'AppWelcome',
|
||||
'WorldCup',
|
||||
'FoodBox',
|
||||
'TakeAHike',
|
||||
'FestivalEvent',
|
||||
'PieceOfCake',
|
||||
'Shoes',
|
||||
'ScienceWeekly',
|
||||
'Faith',
|
||||
'NewsDay',
|
||||
'YogaStudio',
|
||||
'FashionStore',
|
||||
'Charity',
|
||||
'WorldCup',
|
||||
'FoodBox',
|
||||
'FestivalEvent',
|
||||
'RetroComputingMagazine',
|
||||
'Shoes',
|
||||
'PieceOfCake',
|
||||
'Coffee',
|
||||
'Drone',
|
||||
'Retro',
|
||||
'Hotels',
|
||||
'Music',
|
||||
'Retro',
|
||||
'Coffee',
|
||||
'RetroComputingMagazine',
|
||||
'RealEstate',
|
||||
'YogaStudio',
|
||||
'Charity',
|
||||
'FashionStore',
|
||||
|
||||
'WelcomeBlank1Column',
|
||||
'WelcomeBlank12Column',
|
||||
'GiftWelcome',
|
||||
'Minimal',
|
||||
'Phone',
|
||||
'Sunglasses',
|
||||
'RealEstate',
|
||||
'AppWelcome',
|
||||
|
||||
'PostNotificationsBlank1Column',
|
||||
'ModularStyleStories',
|
||||
'NotSoMedium',
|
||||
'RssSimpleNews',
|
||||
'WideStoryLayout',
|
||||
'Avocado',
|
||||
'ScienceWeekly',
|
||||
|
||||
'WineCity',
|
||||
'DogFood',
|
||||
'Fitness',
|
||||
'KidsClothing',
|
||||
'WineCity',
|
||||
'Avocado',
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user