Advertisement
gayanov

Untitled

Mar 12th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  * To change this license header, choose License Headers in Project Properties.
  5.  * To change this template file, choose Tools | Templates
  6.  * and open the template in the editor.
  7.  */
  8.  
  9. namespace App\Http\Controllers;
  10.  
  11. use Illuminate\Http\Request;
  12. use Illuminate\Support\Facades\DB;
  13. use App\Facades\AddDatabaseClass;
  14. //use Session;
  15.  
  16. /**
  17.  * Description of GoodsController
  18.  *
  19.  * @author Ilshat
  20.  */
  21. class OrderController {
  22.    
  23.     private $inputOrders;
  24.    
  25.     private $ipBuyer;
  26.  
  27.     public function __construct(Request $request)
  28.     {
  29.         $this->inputBuyer = $request->input('buyer');
  30.         $this->inputOrders = $request->input('orders');
  31.         $this->ipBuyer = $request->server('HTTP_X_REAL_IP');
  32.        
  33.     }
  34.     public function MessageFrontFlash($typeM, $boyM)
  35.     {
  36.         echo '<script>toastr.'.$typeM.'("'.$boyM.'");</script>';
  37.        
  38.     }
  39.     public function order(Request $request)
  40.     {
  41.        
  42.         $this->validate($request, [
  43.           'buyer.name' => 'required',
  44.           'buyer.surname' => 'required',
  45.           'buyer.phone-number' => 'required',
  46.         ]);
  47.        
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement