GetByUserRequest.php 726 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php
/**
 * Created by PhpStorm.
 * User: gets
 * Date: 4/4/2019
 * Time: 3:45 PM
 */

namespace App\Http\Request;

11
class GetByUserRequest extends FormRequestErrors
12 13 14 15 16 17 18 19 20 21 22 23 24 25
{
    protected function validationData()
    {
        return $this->all();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
26
            'userId' => 'required'
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
        ];
    }

    /**
     * Get custom messages for validator errors.
     *
     * @return array
     */
    public function messages()
    {
        return [];
    }

    protected function modifyData()
    {
        $data = $this->validationData();
        return $data;
    }
}