| 
3 | 3 | use Maatwebsite\Excel\Excel;  | 
4 | 4 | 
 
  | 
5 | 5 | return [  | 
6 |  | - | 
7 | 6 |     'exports' => [  | 
8 | 7 | 
 
  | 
9 | 8 |         /*  | 
 | 
64 | 63 | 
 
  | 
65 | 64 |     'imports'            => [  | 
66 | 65 | 
 
  | 
 | 66 | +        /*  | 
 | 67 | +        |--------------------------------------------------------------------------  | 
 | 68 | +        | Read Only  | 
 | 69 | +        |--------------------------------------------------------------------------  | 
 | 70 | +        |  | 
 | 71 | +        | When dealing with imports, you might only be interested in the  | 
 | 72 | +        | data that the sheet exists. By default we ignore all styles,  | 
 | 73 | +        | however if you want to do some logic based on style data  | 
 | 74 | +        | you can enable it by setting read_only to false.  | 
 | 75 | +        |  | 
 | 76 | +        */  | 
67 | 77 |         'read_only' => true,  | 
68 | 78 | 
 
  | 
 | 79 | +        /*  | 
 | 80 | +        |--------------------------------------------------------------------------  | 
 | 81 | +        | Heading Row Formatter  | 
 | 82 | +        |--------------------------------------------------------------------------  | 
 | 83 | +        |  | 
 | 84 | +        | Configure the heading row formatter.  | 
 | 85 | +        | Available options: none|slug|custom  | 
 | 86 | +        |  | 
 | 87 | +        */  | 
69 | 88 |         'heading_row' => [  | 
70 |  | - | 
71 |  | -            /*  | 
72 |  | -            |--------------------------------------------------------------------------  | 
73 |  | -            | Heading Row Formatter  | 
74 |  | -            |--------------------------------------------------------------------------  | 
75 |  | -            |  | 
76 |  | -            | Configure the heading row formatter.  | 
77 |  | -            | Available options: none|slug|custom  | 
78 |  | -            |  | 
79 |  | -            */  | 
80 | 89 |             'formatter' => 'slug',  | 
81 | 90 |         ],  | 
82 | 91 | 
 
  | 
 | 
104 | 113 |         | Configure e.g. default title, creator, subject,...  | 
105 | 114 |         |  | 
106 | 115 |         */  | 
107 |  | -        'properties'             => [  | 
 | 116 | +        'properties'  => [  | 
108 | 117 |             'creator'        => '',  | 
109 | 118 |             'lastModifiedBy' => '',  | 
110 | 119 |             'title'          => '',  | 
 | 
123 | 132 |     | Extension detector  | 
124 | 133 |     |--------------------------------------------------------------------------  | 
125 | 134 |     |  | 
126 |  | -    | Configure here which writer type should be used when  | 
127 |  | -    | the package needs to guess the correct type  | 
128 |  | -    | based on the extension alone.  | 
 | 135 | +    | Configure here which writer/reader type should be used when the package  | 
 | 136 | +    | needs to guess the correct type based on the extension alone.  | 
129 | 137 |     |  | 
130 | 138 |     */  | 
131 | 139 |     'extension_detector' => [  | 
 | 
157 | 165 |         'pdf'      => Excel::DOMPDF,  | 
158 | 166 |     ],  | 
159 | 167 | 
 
  | 
 | 168 | +    /*  | 
 | 169 | +    |--------------------------------------------------------------------------  | 
 | 170 | +    | Value Binder  | 
 | 171 | +    |--------------------------------------------------------------------------  | 
 | 172 | +    |  | 
 | 173 | +    | PhpSpreadsheet offers a way to hook into the process of a value being  | 
 | 174 | +    | written to a cell. In there some assumptions are made on how the  | 
 | 175 | +    | value should be formatted. If you want to change those defaults,  | 
 | 176 | +    | you can implement your own default value binder.  | 
 | 177 | +    |  | 
 | 178 | +    | Possible value binders:  | 
 | 179 | +    |  | 
 | 180 | +    | [x] Maatwebsite\Excel\DefaultValueBinder::class  | 
 | 181 | +    | [x] PhpOffice\PhpSpreadsheet\Cell\StringValueBinder::class  | 
 | 182 | +    | [x] PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder::class  | 
 | 183 | +    |  | 
 | 184 | +    */  | 
160 | 185 |     'value_binder' => [  | 
161 |  | - | 
162 |  | -        /*  | 
163 |  | -        |--------------------------------------------------------------------------  | 
164 |  | -        | Default Value Binder  | 
165 |  | -        |--------------------------------------------------------------------------  | 
166 |  | -        |  | 
167 |  | -        | PhpSpreadsheet offers a way to hook into the process of a value being  | 
168 |  | -        | written to a cell. In there some assumptions are made on how the  | 
169 |  | -        | value should be formatted. If you want to change those defaults,  | 
170 |  | -        | you can implement your own default value binder.  | 
171 |  | -        |  | 
172 |  | -        */  | 
173 | 186 |         'default' => Maatwebsite\Excel\DefaultValueBinder::class,  | 
174 | 187 |     ],  | 
175 | 188 | 
 
  | 
 | 189 | +    /*  | 
 | 190 | +    |--------------------------------------------------------------------------  | 
 | 191 | +    | Transaction Handler  | 
 | 192 | +    |--------------------------------------------------------------------------  | 
 | 193 | +    |  | 
 | 194 | +    | By default the import is wrapped in a transaction. This is useful  | 
 | 195 | +    | for when an import may fail and you want to retry it. With the  | 
 | 196 | +    | transactions, the previous import gets rolled-back.  | 
 | 197 | +    |  | 
 | 198 | +    | You can disable the transaction handler by setting this to null.  | 
 | 199 | +    | Or you can choose a custom made transaction handler here.  | 
 | 200 | +    |  | 
 | 201 | +    | Supported handlers: null|db  | 
 | 202 | +    |  | 
 | 203 | +    */  | 
176 | 204 |     'transactions' => [  | 
177 |  | - | 
178 |  | -        /*  | 
179 |  | -        |--------------------------------------------------------------------------  | 
180 |  | -        | Transaction Handler  | 
181 |  | -        |--------------------------------------------------------------------------  | 
182 |  | -        |  | 
183 |  | -        | By default the import is wrapped in a transaction. This is useful  | 
184 |  | -        | for when an import may fail and you want to retry it. With the  | 
185 |  | -        | transactions, the previous import gets rolled-back.  | 
186 |  | -        |  | 
187 |  | -        | You can disable the transaction handler by setting this to null.  | 
188 |  | -        | Or you can choose a custom made transaction handler here.  | 
189 |  | -        |  | 
190 |  | -        | Supported handlers: null|db  | 
191 |  | -        |  | 
192 |  | -        */  | 
193 | 205 |         'handler' => 'db',  | 
194 | 206 |     ],  | 
195 | 207 | 
 
  | 
 | 
0 commit comments