first
This commit is contained in:
27
modules/Mall/Http/Exporter/OrderFromArray.php
Normal file
27
modules/Mall/Http/Exporter/OrderFromArray.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Mall\Http\Exporter;
|
||||
|
||||
use Maatwebsite\Excel\Concerns\FromArray;
|
||||
|
||||
/**
|
||||
* Class OrderFromArray
|
||||
* 不再使用 2.x 版本的导出工具。3.x 版本对 laravel-admin 的兼容有些问题,无法直接使用关联模型
|
||||
* @package Modules\Mall\Http\Exporter
|
||||
*/
|
||||
class OrderFromArray implements FromArray
|
||||
{
|
||||
|
||||
protected array $order;
|
||||
|
||||
public function __construct(array $order)
|
||||
{
|
||||
$this->order = $order;
|
||||
}
|
||||
|
||||
public function array(): array
|
||||
{
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user