SyncResponse.php 275 B

123456789101112131415
  1. <?php
  2. namespace App\Components;
  3. use Illuminate\Support\Facades\Gate;
  4. trait SyncResponse{
  5. protected function gate(string $authorityName)
  6. {
  7. if(!Gate::allows($authorityName)){
  8. echo view('exception.authority');
  9. exit();
  10. }
  11. }
  12. }