Completed
Push — master ( 02e9e6...9b3fc3 )
by ARCANEDEV
09:52
created

UpdatePageRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
ccs 0
cts 8
cp 0
cc 1
eloc 5
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Seo\Http\Requests\Admin\Pages;
2
3
/**
4
 * Class     UpdatePageRequest
5
 *
6
 * @package  Arcanesoft\Seo\Http\Requests\Admin\Pages
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
class UpdatePageRequest extends PageFormRequest
10
{
11
    /* -----------------------------------------------------------------
12
     |  Main Methods
13
     | -----------------------------------------------------------------
14
     */
15
    /**
16
     * Determine if the user is authorized to make this request.
17
     *
18
     * @return bool
19
     */
20
    public function authorize()
21
    {
22
        return true;
23
    }
24
25
    /**
26
     * Get the validation rules that apply to the request.
27
     *
28
     * @return array
29
     */
30
    public function rules()
31
    {
32
        return [
33
            'name'    => ['required'],
34
            'locale'  => $this->getLocaleRule(),
35
            'content' => ['required']
36
        ];
37
    }
38
}
39