create road item webservice
This commit is contained in:
33
app/Http/Requests/V3/WebServices/RoadItem/IndexRequest.php
Normal file
33
app/Http/Requests/V3/WebServices/RoadItem/IndexRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\WebServices\RoadItem;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
class IndexRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return
|
||||
$this->username === 'service_user257' &&
|
||||
Hash::check('S3rv1ce@123', $this->password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'from_date' => 'required|date_format:Y-m-d',
|
||||
'to_date' => 'required|date_format:Y-m-d',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user