UserByIdRequest.php 725 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;

Dzulfqar Ridha's avatar
Dzulfqar Ridha committed
11
class UserByIdRequest extends FormRequestErrors
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
{
    protected function validationData()
    {
        return $this->all();
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'userid' => 'required'
        ];
    }

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

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