Completed
Push — master ( 826d66...63fb2c )
by Andrey
01:40
created

Delete::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Itstructure\LaRbac\Http\Requests;
3
4
use Illuminate\Foundation\Http\FormRequest;
5
6
/**
7
 * Class Delete
8
 *
9
 * @package Itstructure\LaRbac\Http\Requests
10
 * @author Andrey Girnik <[email protected]>
11
 */
12
class Delete extends FormRequest
13
{
14
    /**
15
     * Determine if the user is authorized to make this request.
16
     *
17
     * @return bool
18
     */
19
    public function authorize()
20
    {
21
        return true;
22
    }
23
24
    /**
25
     * Get the validation rules that apply to the request.
26
     *
27
     * @return array
28
     */
29
    public function rules()
30
    {
31
        return [
32
            'items' => 'required|array',
33
        ];
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    public function messages()
40
    {
41
        return [
42
            'items.required' => config('rbac.deleteRequired'),
43
        ];
44
    }
45
}
46