You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							18 lines
						
					
					
						
							426 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							18 lines
						
					
					
						
							426 B
						
					
					
				
								<?php
							 | 
						|
								
							 | 
						|
								namespace App\AdminSupplier\Extensions;
							 | 
						|
								use App\Exports\ProductExport;
							 | 
						|
								use Dcat\Admin\Admin;
							 | 
						|
								use Dcat\Admin\Grid\Exporters\AbstractExporter;
							 | 
						|
								use Maatwebsite\Excel\Facades\Excel;
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * Excel导出功能
							 | 
						|
								 */
							 | 
						|
								class ProductToExcelExporter extends AbstractExporter
							 | 
						|
								{
							 | 
						|
									public function export()
							 | 
						|
									{
							 | 
						|
										return Excel::download(new ProductExport(Admin::user()->id), '导出产品-' . date('Y-m-d H:i:s') . '.xlsx')->send();
							 | 
						|
									}
							 | 
						|
								}
							 |