PendingProfileMediaRequest.php 485 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class PendingProfileMediaRequest extends FormRequest
  5. {
  6. public function authorize(): bool
  7. {
  8. return $this->user()?->canModerateClients()
  9. && $this->user()->canModerateProviders();
  10. }
  11. public function rules(): array
  12. {
  13. return [
  14. 'page' => 'sometimes|integer|min:1',
  15. 'per_page' => 'sometimes|integer|min:1|max:100',
  16. ];
  17. }
  18. }