app/Http/Requests/ReportIndexRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'sort_type' => [
                'nullable',
                Rule::in([
                    'id',
                    'category_name',
                    'total',
                    'available',
                    'not_available',
                    'assigned',
                    'waiting_for_recycling',
                    'recycled'
                ])
            ],
            'sort_value' => ['nullable', Rule::in(['asc', 'desc'])],
            'per_page' => ['nullable', 'integer']
        ];
    }
public function rules ( ) { return [ 'sort_type' => [ 'nullable' , Rule :: in ( [ 'id' , 'category_name' , 'total' , 'available' , 'not_available' , 'assigned' , 'waiting_for_recycling' , 'recycled' ] ) ] , 'sort_value' => [ 'nullable' , Rule :: in ( [ 'asc' , 'desc' ] ) ] , 'per_page' => [ 'nullable' , 'integer' ] ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .