Answers for "laravel request rule"

PHP
2

laravel request rule

<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StarShopRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'number' => [
                'required',
                Rule::in([1, 11, 20, 35])
            ]
        ];
    }

}
Posted by: Guest on September-24-2021

Code answers related to "laravel request rule"

Browse Popular Code Answers by Language