-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/export orders #111
base: develop
Are you sure you want to change the base?
Conversation
'updated_at' => ['label' => 'lovata.toolbox::lang.field.updated_at'], | ||
]; | ||
|
||
$arPropertyList = (array) DB::table('lovata_orders_shopaholic_addition_properties') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему не использовать модель для запроса?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
по примеру с импорта брал
controllers/orders/export.htm
Outdated
@@ -0,0 +1,27 @@ | |||
<?php Block::put('breadcrumb') ?> | |||
<ul> | |||
<li><a href="<?= Backend::url('lovata/shopaholic/products') ?>"><?= e(trans('lovata.shopaholic::lang.product.list_title')) ?></a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Некорректная сслыка
models/OrderExport.php
Outdated
* @property Status $status | ||
* @method static Status|\October\Rain\Database\Relations\BelongsTo status() | ||
*/ | ||
class OrderExport extends ExportModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему нельзя сделать наследование в основном классе?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а если потом появится импорт заказов?
} | ||
|
||
foreach ($arPropertyList as $sField => $sLabel) { | ||
$arFieldList[$sField] = ['label' => $sLabel]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Здесь возможно можно сделать 'property.'.$sField
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нет. в метод модели будет передоваться просто массив с ключом 'property.field'
No description provided.