Passed
Push — main ( bb1631...b48e8d )
by PRATIK
07:52 queued 04:02
created

HistoryRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
cc 1
eloc 9
c 2
b 0
f 2
nc 1
nop 0
dl 0
loc 11
rs 9.9666
1
<?php
2
3
namespace Adminetic\Website\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
class HistoryRequest extends FormRequest
8
{
9
    /**
10
     * Determine if the user is authorized to make this request.
11
     */
12
    public function authorize(): bool
13
    {
14
        return true;
15
    }
16
17
    /**
18
     * Get the validation rules that apply to the request.
19
     *
20
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
21
     */
22
    public function rules(): array
23
    {
24
        return [
25
            'title' => 'required|max:200',
26
            'description' => 'nullable',
27
            'date' => 'nullable|date',
28
            'active' => 'nullable',
29
            'position' => 'nullable',
30
            'meta_name' => 'nullable|max:100',
31
            'meta_description' => 'nullable|max:255',
32
            'meta_keywords' => 'nullable|max:100',
33
        ];
34
    }
35
}
36