Exemplo n.º 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($pid, $fid, FormRequest $request)
 {
     $form = FormController::getForm($fid);
     if (!FormController::checkPermissions($pid, 'edit')) {
         return redirect('/projects/' . $form->{$pid} . '/forms');
     }
     $form->update($request->all());
     flash()->overlay('Your form has been successfully updated!', 'Good Job');
     return redirect('projects/' . $form->pid);
 }
Exemplo n.º 2
0
 public function searchPage(FormRequest $request, $name = "")
 {
     if ($name != "") {
         $tensanpham = $name;
     } else {
         $tensanpham = $request->get("ten_san_pham");
     }
     $products = Products::getProductByName($tensanpham, 25);
     $products->setPath("tim-kiem");
     $arrayCurrentCateName = [["name" => "Kết quả tìm kiếm {$tensanpham}"]];
     $lovedProductsId = ["0"];
     if (Auth::check()) {
         $lovedProductsId = customer::LovedProduct("id");
     }
     return view("pages.list_products", compact("products", "arrayParentName", "arrayCurrentCateName", "lovedProductsId"));
 }
Exemplo n.º 3
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(FormRequest $request, $id)
 {
     $aryData = $request->all();
     echo '<pre>';
     echo '<meta charset="utf-8">';
     print_r($aryData);
     echo '</pre>';
     die('xxx');
 }