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.
		
		
		
		
		
			
		
			
				
					
					
						
							27 lines
						
					
					
						
							503 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							27 lines
						
					
					
						
							503 B
						
					
					
				
								<?php
							 | 
						|
								
							 | 
						|
								namespace App\AdminAgent\Forms;
							 | 
						|
								
							 | 
						|
								use App\Models\ProductSpec;
							 | 
						|
								use Dcat\Admin\Widgets\Form;
							 | 
						|
								use Dcat\Admin\Traits\LazyWidget;
							 | 
						|
								use Dcat\Admin\Contracts\LazyRenderable;
							 | 
						|
								
							 | 
						|
								class LoadSupplierSpec extends Form implements LazyRenderable
							 | 
						|
								{
							 | 
						|
									use LazyWidget;
							 | 
						|
								
							 | 
						|
									// 处理请求
							 | 
						|
									public function handle(array $input)
							 | 
						|
									{
							 | 
						|
										$id = $input['id'];
							 | 
						|
										$spec = ProductSpec::where('product_id', $id)->get()->toArray();
							 | 
						|
								
							 | 
						|
										return $this->response()->data($spec);
							 | 
						|
									}
							 | 
						|
								
							 | 
						|
									public function form()
							 | 
						|
									{
							 | 
						|
										$this->hidden('id');
							 | 
						|
									}
							 | 
						|
								}
							 |