CreateScheduleFromOrderRequest.php 803 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class CreateScheduleFromOrderRequest extends FormRequest
  5. {
  6. /**
  7. * Determine if the user is authorized to make this request.
  8. */
  9. public function authorize(): bool
  10. {
  11. return auth()->check();
  12. }
  13. /**
  14. * Get the validation rules that apply to the request.
  15. *
  16. * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
  17. */
  18. public function rules(): array
  19. {
  20. return [
  21. 'order_id' => 'required|exists:orders,id',
  22. 'comment' => 'nullable|string',
  23. 'skus' => 'nullable|array',
  24. 'delete_old_records' => 'nullable|string',
  25. ];
  26. }
  27. }