Last active
          August 1, 2021 15:48 
        
      - 
      
- 
        Save robertdrakedennis/063e6c6032d260427a4e6587c1600300 to your computer and use it in GitHub Desktop. 
    AccessesRules Trait, used for form requests
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| namespace App\Traits; | |
| use Illuminate\Support\Arr; | |
| trait AccessRules | |
| { | |
| public static function getRules(array $only = []): array | |
| { | |
| return empty($only) ? static::$rules : Arr::only(static::$rules, $only); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment