mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:07:33 -05:00 
			
		
		
		
	Merge pull request #6393 from turbo124/v5-develop
Set DB for live previews
This commit is contained in:
		
						commit
						5f30632370
					
				@ -200,7 +200,14 @@ class PreviewController extends BaseController
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            if($request->has('entity_id')){
 | 
					            if($request->has('entity_id')){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $entity_obj = $class::on(auth()->user()->company()->db)->withTrashed()->whereId($this->decodePrimaryKey($request->input('entity_id')))->company()->first();
 | 
					                $entity_obj = $class::on(auth()->user()->company()->db)
 | 
				
			||||||
 | 
					                                    ->withTrashed()
 | 
				
			||||||
 | 
					                                    ->where('id', $this->decodePrimaryKey($request->input('entity_id')))
 | 
				
			||||||
 | 
					                                    ->where('company_id', auth()->user()->company()->id)
 | 
				
			||||||
 | 
					                                    ->first();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                info(print_r($entity_obj,1));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $entity_obj = $repo->save($request->all(), $entity_obj);
 | 
					                $entity_obj = $repo->save($request->all(), $entity_obj);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user