Fixed empty search scenario
This commit is contained in:
		
							parent
							
								
									715dee2d0e
								
							
						
					
					
						commit
						7a2e39212e
					
				| 
						 | 
				
			
			@ -45,6 +45,10 @@ class SearchOptions
 | 
			
		|||
     */
 | 
			
		||||
    public static function fromRequest(Request $request): SearchOptions
 | 
			
		||||
    {
 | 
			
		||||
        if (!$request->has('search') && !$request->has('term')) {
 | 
			
		||||
            return static::fromString('');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($request->has('term')) {
 | 
			
		||||
            return static::fromString($request->get('term'));
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue