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.

35 lines
956 B

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