Completed
Push — master ( 8927df...f70445 )
by Abdelrahman
02:05
created

PhoneVerificationSendRequest::rules()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 7
rs 9.4285
c 2
b 0
f 0
1
<?php
2
3
/*
4
 * NOTICE OF LICENSE
5
 *
6
 * Part of the Rinvex Fort Package.
7
 *
8
 * This source file is subject to The MIT License (MIT)
9
 * that is bundled with this package in the LICENSE file.
10
 *
11
 * Package: Rinvex Fort Package
12
 * License: The MIT License (MIT)
13
 * Link:    https://rinvex.com
14
 */
15
16
namespace Rinvex\Fort\Http\Requests\Frontend;
17
18
class PhoneVerificationSendRequest extends PhoneVerificationRequest
19
{
20
    /**
21
     * Get the validation rules that apply to the request.
22
     *
23
     * @return array
24
     */
25
    public function rules()
26
    {
27
        return $this->isMethod('post') ? [
28
            'phone'  => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone',
29
            'method' => 'required',
30
        ] : [];
31
    }
32
}
33