public function mailOrder(Request $request) { $view = 'emails.order'; $subject = 'New Order Receipt'; $data = $request->only('product_name', 'message_text', 'email', 'phone'); $data['title'] = "New Order Email"; $user = (object) ['email' => '*****@*****.**']; return $this->sendTo($user, $subject, $view, $data); }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $arr = Request::only('Id', 'CatalogId', 'Keyword'); $keyword = $arr['Keyword']; $catalog_id = $arr['CatalogId']; $id = $arr['Id']; if ($id) { if ($this->checkKeyword($id, $catalog_id, $keyword)) { return []; } else { return ['CatalogId' => 'required', 'Keyword' => 'required|unique:translation_keyword,keyword,NULL,id,catalog_id,' . $catalog_id]; } } else { return ['CatalogId' => 'required', 'Keyword' => 'required|unique:translation_keyword,keyword,NULL,id,catalog_id,' . $catalog_id]; } }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $id_arr = Request::only('Id'); $id = $id_arr['Id']; return ['Name' => 'required|max:100|unique:course,name,' . $id]; }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $id_arr = Request::only('Id'); $id = $id_arr['Id']; return ['Name' => 'required|max:100|unique:subject,name,' . $id, 'Code' => 'required|max:10|unique:subject,code,' . $id]; }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $id_arr = Request::only('Id'); $id = $id_arr['Id']; return ['Year' => 'required|integer|max:' . date('Y') . '|unique:school_year,year,' . $id, 'DateStart' => 'date', 'DateEnd' => 'date', 'Description' => 'max:255']; }
/** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $id_arr = Request::only('Id'); $id = $id_arr['Id']; return ['Name' => 'required|max:100', 'Login' => 'required|max:32|unique:admin_user,login,' . $id, 'Email' => 'required|max:50|email|unique:admin_user,email,' . $id]; }