Esempio n. 1
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $dataCategory = Categories::whereFlagactive(1)->lists('id')->toArray();
     $listCategory = implode(",", $dataCategory);
     $rules = ['description' => 'required', 'pu_category_id' => "required|in:{$listCategory}", 'name_provider' => 'required', 'email' => 'required:unique:pr_providers,email', 'phone' => 'required'];
     return $rules;
 }
Esempio n. 2
0
 /**
  * Get the validation rules that apply to the request.
  *
  * @return array
  */
 public function rules()
 {
     $dataCategory = Categories::whereFlagactive(1)->lists('id')->toArray();
     $listCategory = implode(",", $dataCategory);
     $rules = ['description' => 'required', 'pu_category_id' => "required|in:{$listCategory}"];
     return $rules;
 }