update api and add more features
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Promotions;
|
||||
|
||||
use App\Http\Requests\ApiFormRequest;
|
||||
use App\Models\PromotionReminderLog;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class SendReminderRequest extends ApiFormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'reminder_type' => ['nullable', 'string', Rule::in(PromotionReminderLog::ALLOWED_TYPES)],
|
||||
'subject' => ['nullable', 'string', 'max:191'],
|
||||
'message' => ['nullable', 'string', 'max:5000'],
|
||||
'channels' => ['nullable', 'array'],
|
||||
'channels.*' => ['string', Rule::in(['in_app', 'email', 'sms'])],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user