Php Laravel请求-如何知道规则()中的父/目标类名
Laravel请求-在返回规则数组之前,如何知道rules()方法中的父/目标类名Php Laravel请求-如何知道规则()中的父/目标类名,php,laravel,Php,Laravel,Laravel请求-在返回规则数组之前,如何知道rules()方法中的父/目标类名 public function rules(){ /** * 1:: We need to know parent/destination class name */ return [ // ]; } 在规则内,您可以执行以下操作: 您想知道FormRequest/控制器的名称吗?请举个例子。@HCK公共函数store(SomeRequest$re
public function rules(){
/**
* 1:: We need to know parent/destination class name
*/
return [
//
];
}
在规则内,您可以执行以下操作:
您想知道FormRequest/控制器的名称吗?请举个例子。@HCK公共函数store(SomeRequest$request){$this->validateStore($request);}我想得到包含store(SomeRequest$request)的类