File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 33namespace  DragonCode \LaravelSupport \Support ;
44
55use  DragonCode \LaravelSupport \Exceptions \IncorrectModelException ;
6+ use  Illuminate \Database \Eloquent \Builder ;
67use  Illuminate \Database \Eloquent \Model ;
78
89class  ModelHelper
@@ -82,6 +83,20 @@ public function primaryKeyType($model): string
8283            ->getKeyType ();
8384    }
8485
86+     /** 
87+      * @param \Illuminate\Database\Eloquent\Model|string $model 
88+      * 
89+      * @throws \DragonCode\LaravelSupport\Exceptions\IncorrectModelException 
90+      * 
91+      * @return \Illuminate\Database\Eloquent\Builder 
92+      */ 
93+     public  function  query ($ model ): Builder 
94+     {
95+         return  $ this 
96+             ->model ($ model )
97+             ->newQuery ();
98+     }
99+ 
85100    /** 
86101     * @param \Illuminate\Database\Eloquent\Model|string $model 
87102     * 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments