wip
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api\V1\Forms\ContactUS;
|
||||
|
||||
use App\Models\System\Settings\OS;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ContactUSStoreRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'phone' => ['required', 'integer', 'between:61000000,71999999'],
|
||||
'title' => ['required', 'string', 'max:255'],
|
||||
'content' => ['required', 'string', 'max:1000'],
|
||||
'type' => ['required', 'string', Rule::in(OS::MOBILE_APP, OS::MOBILE_ADMIN)],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Body Parameters for scribe
|
||||
*
|
||||
* @return array<string, array<string, string>>
|
||||
*/
|
||||
public function bodyParameters(): array
|
||||
{
|
||||
return [
|
||||
'phone' => [
|
||||
'description' => 'Phone number',
|
||||
'example' => '61929248',
|
||||
],
|
||||
'title' => [
|
||||
'description' => 'Message title',
|
||||
'example' => 'Hello',
|
||||
],
|
||||
'content' => [
|
||||
'description' => 'Message content',
|
||||
'example' => 'Awesome JOB',
|
||||
],
|
||||
'type' => [
|
||||
'description' => 'From where?',
|
||||
'example' => 'mobile_app',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api\V1\Forms\Newsletter;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class NewsletterSubscriptionStoreRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'email' => ['required', 'email', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user