Completed
Push — master ( db6658...fecd46 )
by Eric
01:44
created

UserStoreArticle::authorize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Ergare17\Articles\Http\Requests;
4
5
use Acacha\Events\Http\Requests\Traits\ChecksPermissions;
6
use Illuminate\Foundation\Http\FormRequest;
7
use Illuminate\Support\Facades\Auth;
8
9
/**
10
 * Class UserStoreArticle
11
 *
12
 * @package App\Http\Requests
13
 */
14
class UserStoreArticle extends FormRequest
15
{
16
    use ChecksPermissions;
17
18
    /**
19
     * Determine if the user is authorized to make this request.
20
     *
21
     * @return bool
22
     */
23
    public function authorize()
24
    {
25
        return true;
26
    }
27
28
    /**
29
     * Get the validation rules that apply to the request.
30
     *
31
     * @return array
32
     */
33
    public function rules()
34
    {
35
        return [
36
            'name' => 'required',
37
            'user_id' => 'required'
38
        ];
39
    }
40
}
41