You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
902 B

2 years ago
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
  4. use Illuminate\Foundation\Bus\DispatchesJobs;
  5. use Illuminate\Foundation\Validation\ValidatesRequests;
  6. use Illuminate\Routing\Controller as BaseController;
  7. class Controller extends BaseController
  8. {
  9. use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
  10. protected function resourceAbilityMap()
  11. {
  12. return [
  13. 'index' => 'viewAny',
  14. 'show' => 'view',
  15. 'create' => 'create',
  16. 'store' => 'create',
  17. 'edit' => 'update',
  18. 'update' => 'update',
  19. 'destroy' => 'delete',
  20. 'restore' => 'restore',
  21. 'action' => 'action',
  22. 'single' => 'view',
  23. ];
  24. }
  25. protected function resourceMethodsWithoutModels()
  26. {
  27. return ['index', 'action', 'create', 'store'];
  28. }
  29. }