Completed
Push — AddActivityLog ( afa80e...195157 )
by D.
45:05 queued 35:04
created

VisitRequest::authorize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SET\Http\Requests;
4
5
use Illuminate\Support\Facades\Gate;
6
7
/**
8
 * Class VisitRequest.
9
 */
10
class VisitRequest 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 Gate::allows('edit');
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
            'smo_code'        => 'required',
31
            'expiration_date' => 'required',
32
        ];
33
    }
34
}
35