Completed
Push — master ( 7d31a3...940899 )
by Eric
05:23
created

SendEmail   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 6 1
A authorize() 0 3 1
1
<?php
2
3
namespace App\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
use Illuminate\Support\Facades\Auth;
7
8
/**
9
 * Class SendEmail.
10
 */
11
class SendEmail extends FormRequest
12
{
13
    /**
14
     * Determine if the user is authorized to make this request.
15
     *
16
     * @return bool
17
     */
18
    public function authorize()
19
    {
20
        return true;
21
    }
22
23
    /**
24
     * Get the validation rules that apply to the request.
25
     *
26
     * @return array
27
     */
28
    public function rules()
29
    {
30
        return [
31
            'emailto' => 'required|email|max:255',
32
            'subject' => 'required',
33
            'body' => 'required',
34
        ];
35
    }
36
}
37