Completed
Push — master ( 392bd3...60208d )
by ARCANEDEV
04:52
created

UpdatePostRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 45
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 4 1
1
<?php namespace Arcanesoft\Blog\Http\Requests\Backend\Posts;
2
3
use Arcanesoft\Blog\Bases\FormRequest;
4
5
/**
6
 * Class     UpdatePostRequest
7
 *
8
 * @package  Arcanesoft\Blog\Http\Requests\Backend\Posts
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class UpdatePostRequest extends FormRequest
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Properties
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    /**
18
     * Category validation rules.
19
     *
20
     * @var array
21
     */
22
    protected $rules = [
23
        'title'        => 'required|max:255',
24
        'excerpt'      => 'required|max:200',
25
        'content'      => 'required',
26
        'category'     => 'required|min:1',
27
        'tags'         => 'required|array|min:1',
28
        'publish_date' => 'required',
29
        'status'       => 'required',
30
    ];
31
32
    /* ------------------------------------------------------------------------------------------------
33
     |  Main Functions
34
     | ------------------------------------------------------------------------------------------------
35
     */
36
    /**
37
     * Determine if the user is authorized to make this request.
38
     *
39
     * @return bool
40
     */
41
    public function authorize()
42
    {
43
        return true;
44
    }
45
46
    /**
47
     * Get the validation rules that apply to the request.
48
     *
49
     * @return array
50
     */
51
    public function rules()
52
    {
53
        return $this->rules;
54
    }
55
}
56