不同授权策略类中的相同方法, 框架是怎么识别的呢? 
                            
                                                    
                        
                    
                    
  
                    
                     @can('destroy', $status)
    <form action="{{ route('statuses.destroy', $status->id) }}" method="POST">
      {{ csrf_field() }}
      {{ method_field('DELETE') }}
      <button type="submit" class="btn btn-sm btn-danger">删除</button>
    </form>
  @endcan上面的destroy方法, 在UserPolicy.php 和 StatusPolicy.php中都有这个方法, 上面这段代码中, 框架是怎么知道应该使用StatusPolicy中的destroy方法呢?
 
           
         
                     
                     
            
 
             
           
           关于 LearnKu
                关于 LearnKu
               
                     
                     
                     粤公网安备 44030502004330号
 粤公网安备 44030502004330号 
 
推荐文章: