Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 /**
  * 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];
     }
 }
Ejemplo n.º 3
0
 /**
  * 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];
 }
Ejemplo n.º 4
0
 /**
  * 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];
 }
Ejemplo n.º 5
0
 /**
  * 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'];
 }
Ejemplo n.º 6
0
 /**
  * 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];
 }