我使用了自定义请求页面来发布请求中的值。
在该请求中我正在验证
namespace App\Http\Requests; use App\Http\Requests\Request; class TaxclassRequest extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ "tax_class"=>'unique:taxes,tax_class' ]; } }
我的控制器是
function insert(TaxclassRequest $request) { $n=$request->input('number'); //total number of variable that has been created dyanamic $tax_class=$request->input("tax_class"); // tax_class . . . other code
我收到错误
ERR_TOO_MANY_REDIRECTS