Completed
Push — master ( 015a60...9d3bbf )
by Glenn
05:38 queued 03:02
created

NewStaffValidator::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Requests;
4
5
use App\Http\Requests\Request;
6
7
/**
8
 * @property mixed department
9
 */
10
class NewStaffValidator extends Request
11
{
12
    /**
13
     * Determine if the user is authorized to make this request.
14
     *
15
     * @return bool
16
     */
17
    public function authorize()
18
    {
19
        return true;
20
    }
21
22
    /**
23
     * Get the validation rules that apply to the request.
24
     *
25
     * @return array
26
     */
27
    public function rules()
28
    {
29
        return [
30
            'fname'      => 'required',
31
            'name'       => 'required',
32
            'email'      => 'required',
33
            'department' => 'required',
34
        ];
35
    }
36
}
37