mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 06:37:33 -05:00 
			
		
		
		
	Add updated_at filter
This commit is contained in:
		
							parent
							
								
									38141754d1
								
							
						
					
					
						commit
						1bae14c337
					
				@ -232,6 +232,28 @@ abstract class QueryFilters
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function updated_at($value = '')
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if ($value == '')
 | 
				
			||||||
 | 
					            return $this->builder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (is_numeric($value)) {
 | 
				
			||||||
 | 
					                $created_at = Carbon::createFromTimestamp((int)$value);
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                $created_at = Carbon::parse($value);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return $this->builder->where('updated_at', '>=', $created_at);
 | 
				
			||||||
 | 
					        } catch (\Exception $e) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return $this->builder;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function is_deleted($value)
 | 
					    public function is_deleted($value)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if ($value == 'true') {
 | 
					        if ($value == 'true') {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user