Completed
Push — master ( 2ccb51...4b9a6b )
by ARCANEDEV
02:56
created

UpdateCategoryRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Blog\Http\Requests\Backend\Categories;
2
3
use Arcanesoft\Blog\Bases\FormRequest;
4
5
/**
6
 * Class     UpdateCategoryRequest
7
 *
8
 * @package  Arcanesoft\Blog\Http\Requests\Backend\Categories
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class UpdateCategoryRequest extends FormRequest
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Category validation rules.
19
     *
20
     * @var array
21
     */
22
    protected $rules = [
23
        'name' => 'required|min:3',
24
    ];
25
26
    /* ------------------------------------------------------------------------------------------------
27
     |  Main Functions
28
     | ------------------------------------------------------------------------------------------------
29
     */
30
    /**
31
     * Determine if the user is authorized to make this request.
32
     *
33
     * @return bool
34
     */
35
    public function authorize()
36
    {
37
        return true;
38
    }
39
40
    /**
41
     * Get the validation rules that apply to the request.
42
     *
43
     * @return array
44
     */
45
    public function rules()
46
    {
47
        return $this->rules;
48
    }
49
}
50