Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 22.79 KB | None | 0 0
  1. <?php
  2.  
  3. use Slim\Http\Request;
  4. use Slim\Http\Response;
  5.  
  6. header("Access-Control-Allow-Origin: *");
  7.  
  8. // Routes
  9.  
  10. $app->get('/', function (Request $request, Response $response, array $args) {
  11.     // Sample log message
  12.     $this->logger->info("Slim-Skeleton '/' route");
  13.  
  14.     // Render index view
  15.     return $this->renderer->render($response, 'index.phtml', $args);
  16. });
  17.  
  18. // $app->get('/recipes', function (Request $request, Response $response, array $args) {
  19.    
  20. //     $data = file_get_contents(__DIR__ . '/dbstore/food.json');
  21. //     $newResponse = $response->withJson($data);
  22.  
  23. //     return $newResponse;
  24. // });
  25.  
  26. // Get data from MySQLi
  27. $app->get('/users', function(){
  28.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  29.     $query = "SELECT * FROM users ORDER BY id";
  30.     $result = $mysqli->query($query) or die($mysqli->error);
  31.  
  32.     while($row = $result->fetch_assoc()) {
  33.         $data[] = $row;
  34.         // echo "number of rows: " . $result->num_rows;
  35.     }
  36.  
  37.     if (isset($data)) {
  38.         header('Content-Type: application/json');
  39.         // echo '{"users": ' . json_encode($data) . '}';
  40.         echo '{"users": ' . json_encode($data, JSON_UNESCAPED_UNICODE) . '}';
  41.     }
  42. });
  43.  
  44. $app->get('/singleUser', function(Request $request, Response $response){
  45.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  46.    
  47.     $userid = $request->getParam('userid');
  48.  
  49.     // try it!
  50.     try {
  51.         // Might need to add some security to this..
  52.         // make query string
  53.         $sql = "SELECT * FROM users WHERE id =:userid";
  54.        
  55.         $stmt = $pdo->prepare($sql); // chaining SQL statements..
  56.  
  57.         $stmt->bindParam("userid", $userid);
  58.  
  59.         $stmt->execute();
  60.  
  61.         $userData = $stmt->fetch(PDO::FETCH_OBJ);
  62.        
  63.         return $response->withJson(['response' => 'success', 'userData' => $userData], 200);
  64.     }
  65.     // did we get any errors?
  66.     catch (PDOException $e) {
  67.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  68.     }
  69. });
  70.  
  71. $app->get('/singleInsurance', function(Request $request, Response $response){
  72.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  73.    
  74.     $insuranceid = $request->getParam('insuranceid');
  75.  
  76.     // try it!
  77.     try {
  78.         // Might need to add some security to this..
  79.         // make query string
  80.         $sql = "SELECT * FROM insurances WHERE id =:insuranceid";
  81.        
  82.         $stmt = $pdo->prepare($sql); // chaining SQL statements..
  83.  
  84.         $stmt->bindParam("insuranceid", $insuranceid);
  85.  
  86.         $stmt->execute();
  87.  
  88.         $insuranceData = $stmt->fetch(PDO::FETCH_OBJ);
  89.        
  90.         return $response->withJson(['response' => 'success', 'insuranceData' => $insuranceData], 200);
  91.     }
  92.     // did we get any errors?
  93.     catch (PDOException $e) {
  94.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  95.     }
  96. });
  97.  
  98. // $data = $request->getParam('paramName');
  99. //$data = $request->getParams(); // if you want to get all params
  100.  
  101. // Get data from MySQL with PDO
  102. $app->post('/addUser', function(Request $request, Response $response){
  103.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  104.    
  105.     // get username and password
  106.     $username = $request->getParam('username');
  107.     $password = password_hash($request->getParam('password'), PASSWORD_DEFAULT);
  108.     $firstname = $request->getParam('firstname');
  109.     $lastname = $request->getParam('lastname');
  110.     $email = $request->getParam('email');
  111.     $role = $request->getParam('role');
  112.  
  113.     // try it!
  114.     try {
  115.         // Might need to add some security to this..
  116.         // make query string
  117.         $sql = "INSERT INTO users (username, password, firstname, lastname, email, role) VALUES (?,?,?,?,?,?)";
  118.         $pdo->prepare($sql)->execute([$username, $password, $firstname, $lastname, $email, $role]); // chaining SQL statements..
  119.  
  120.         return $response->withJson(['response' => 'success', 'message' => 'Added user to database'], 200);
  121.     }
  122.     // did we get any errors?
  123.     catch (PDOException $e) {
  124.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  125.         //echo '{"error":{"text":'. $e->getMessage() .'}}'; //print a error
  126.     }
  127. });
  128.  
  129. $app->post('/editUser', function(Request $request, Response $response){
  130.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  131.    
  132.     // get username and password
  133.     $username = $request->getParam('username');
  134.     $password = password_hash($request->getParam('password'), PASSWORD_DEFAULT);
  135.     $firstname = $request->getParam('firstname');
  136.     $lastname = $request->getParam('lastname');
  137.     $email = $request->getParam('email');
  138.     $userid = $request->getParam('userid');
  139.     $role = $request->getParam('role');
  140.  
  141.     // try it!
  142.     try {
  143.         // Might need to add some security to this..
  144.         // make query string
  145.         $sql = "UPDATE users SET username = ?, password = ?, firstname = ?, lastname = ?, email = ?, role = ? WHERE id = ?";
  146.         $pdo->prepare($sql)->execute([$username, $password, $firstname, $lastname, $email, $role, $userid]); // chaining SQL statements..
  147.  
  148.         return $response->withJson(['response' => 'success', 'message' => 'Updated user data'], 200);
  149.     }
  150.     // did we get any errors?
  151.     catch (PDOException $e) {
  152.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  153.         //echo '{"error":{"text":'. $e->getMessage() .'}}'; //print a error
  154.     }
  155. });
  156.  
  157. $app->post('/removeUser', function(Request $request, Response $response){
  158.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  159.    
  160.     // get username and password
  161.     $userid = $request->getParam('userid');
  162.    
  163.     if($userid == 20) {
  164.         return $response->withJson(['response' => 'failed', 'message' => 'User cannot be removed'], 200);
  165.     }
  166.  
  167.     // try it!
  168.     try {
  169.         // Might need to add some security to this..
  170.         // make query string
  171.         $sql = "DELETE FROM users WHERE id = ?";
  172.         $pdo->prepare($sql)->execute([$userid]); // chaining SQL statements..
  173.  
  174.         return $response->withJson(['response' => 'success', 'message' => 'User removed'], 200);
  175.     }
  176.     // did we get any errors?
  177.     catch (PDOException $e) {
  178.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  179.         //echo '{"error":{"text":'. $e->getMessage() .'}}'; //print a error
  180.     }
  181. });
  182.  
  183. // Get data from MySQL with PDO
  184. $app->post('/login', function(Request $request, Response $response){
  185.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  186.     // get username and password
  187.     $username = $request->getParam('username');
  188.     $password = $request->getParam('password');
  189.    
  190.     // try it!
  191.     try {
  192.         // Might need to add some security to this..
  193.         // make query string
  194.         $sql = "SELECT id, firstname, lastname, email, username, password, role FROM users WHERE (username=:username or email=:username)";
  195.        
  196.         $stmt = $pdo->prepare($sql);
  197.  
  198.         $stmt->bindParam("username", $username, PDO::PARAM_STR);
  199.        
  200.         $stmt->execute();
  201.  
  202.         $mainCount = $stmt->rowCount();
  203.  
  204.         if($mainCount == 0) {
  205.             return $response->withJson(['response' => 'failed', 'message' => 'Fel användarnamn eller lösenord'], 200);
  206.         }
  207.         $userData = $stmt->fetch(PDO::FETCH_OBJ);
  208.  
  209.         if(!empty($userData) && password_verify($password, $userData->password)) {
  210.             return $response->withJson(['response' => 'success', 'userData' => $userData], 200);
  211.         }
  212.         else {
  213.             return $response->withJson(['response' => 'failed', 'message' => 'Fel användarnamn eller lösenord'], 200);
  214.         }
  215.     }
  216.     // did we get any errors?
  217.     catch (PDOException $e) {
  218.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  219.         //echo '{"error":{"text":'. $e->getMessage() .'}}'; //print a error
  220.     }
  221. });
  222.  
  223. // Get data from MySQLi
  224. $app->get('/insurances', function(){
  225.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  226. //    $query = "SELECT * FROM insurances ORDER BY Koncern";
  227.     $query = "SELECT * FROM insurances INNER JOIN customers ON insurances.Kund_id=customers.Kund_id ORDER BY Koncern";
  228.     $result = $mysqli->query($query) or die($mysqli->error);
  229.  
  230.     while($row = $result->fetch_assoc()) {
  231.         $data[] = $row;
  232.         // echo "number of rows: " . $result->num_rows;
  233.     }
  234.  
  235.     if (isset($data)) {
  236.         header('Content-Type: application/json');
  237.        
  238.         // echo json_encode($data);
  239.         echo '{"insurances": ' . json_encode($data, JSON_UNESCAPED_UNICODE) . '}';
  240.     }
  241. });
  242.  
  243. // Get data from MySQLi
  244. $app->get('/customers', function(){
  245.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  246.     $query = "SELECT * FROM customers ORDER BY Koncern";
  247.     $result = $mysqli->query($query) or die($mysqli->error);
  248.  
  249.     while($row = $result->fetch_assoc()) {
  250.         $data[] = $row;
  251.         // echo "number of rows: " . $result->num_rows;
  252.     }
  253.  
  254.     if (isset($data)) {
  255.         header('Content-Type: application/json');
  256.        
  257.         // echo json_encode($data);
  258.         echo '{"customers": ' . json_encode($data, JSON_UNESCAPED_UNICODE) . '}';
  259.     }
  260. });
  261.  
  262. // Get data from MySQL with PDO
  263. $app->get('/getcustomersdata', function(Request $request, Response $response){
  264.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  265.  
  266.     try {
  267.         $sql = "SELECT * FROM customers GROUP BY Koncern";
  268.        
  269.         $stmt = $pdo->prepare($sql);
  270.  
  271.         $stmt->execute();
  272.  
  273.         $mainCount = $stmt->rowCount();
  274.  
  275.         if($mainCount == 0) {
  276.             return $response->withJson(['response' => 'failed', 'message' => 'Ingen data'], 200);
  277.         }
  278.  
  279.         $customersData = $stmt->fetchAll(PDO::FETCH_OBJ);
  280.  
  281.         if(!empty($customersData)) {
  282.             return $response->withJson(['response' => 'success', 'customersData' => $customersData], 200);
  283.         }
  284.         else {
  285.             return $response->withJson(['response' => 'failed', 'message' => 'Ingen data'], 200);
  286.         }
  287.     }
  288.     // did we get any errors?
  289.     catch (PDOException $e) {
  290.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  291.     }
  292. });
  293.  
  294. /*
  295. $app->get('/getcustomersdata', function(){
  296.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  297.     $query = "SELECT * FROM customers";
  298.     // :)
  299.     $result = $mysqli->query($query) or die($mysqli->error);
  300.  
  301.     while($row = $result->fetch_assoc()) {
  302.         $data[] = $row;
  303.         // echo "number of rows: " . $result->num_rows;
  304.     }
  305.  
  306.     if (isset($data)) {
  307.         header('Content-Type: application/json');
  308.        
  309.         echo '{"customersdata": ' . json_encode($data, JSON_UNESCAPED_UNICODE) . '}';
  310.     }
  311. });
  312. */
  313. // Get data from MySQLi
  314. $app->get('/responsible', function(){
  315.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  316.     $query = "SELECT Kundansvarig FROM insurances GROUP BY Kundansvarig";
  317.     $result = $mysqli->query($query) or die($mysqli->error);
  318.  
  319.     while($row = $result->fetch_assoc()) {
  320.         $data[] = $row;
  321.         // echo "number of rows: " . $result->num_rows;
  322.     }
  323.  
  324.     if (isset($data)) {
  325.         header('Content-Type: application/json');
  326.        
  327.         // echo json_encode($data);
  328.         echo '{"responsible": ' . json_encode($data, JSON_UNESCAPED_UNICODE) . '}';
  329.     }
  330. });
  331.  
  332. // Get data from MySQLi
  333. // $app->get('/customers', function(){
  334. //     require_once(__DIR__ . '/dbstore/dbconnect.php');
  335. //     $query = "SELECT * FROM customers GROUP BY Koncern";
  336. //     $result = $mysqli->query($query) or die($mysqli->error);
  337.  
  338. //     while($row = $result->fetch_assoc()) {
  339. //         $data[] = $row;
  340. //         // echo "number of rows: " . $result->num_rows;
  341. //     }
  342.  
  343. //     if (isset($data)) {
  344. //         header('Content-Type: application/json');
  345.        
  346. //         // echo json_encode($data);
  347. //         echo '{"customers": ' . json_encode($data, JSON_UNESCAPED_UNICODE) . '}';
  348. //     }
  349. // });
  350.  
  351. // Get data from MySQL with PDO
  352. $app->post('/addInsurance', function(Request $request, Response $response){
  353.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  354.    
  355.     // get username and password
  356.     $orgnr = $request->getParam('Organisationsnummer');
  357.     $koncern = $request->getParam('Koncern');
  358.     $orgdottrb = $request->getParam('Organisationsnummer_Dotterbolag');
  359.     $dottrb = $request->getParam('Dotterbolag');    
  360.     $uppdrutg = $request->getParam('Uppdragsavtalets_utgang');
  361.    
  362.     $ovriginfo = $request->getParam('Ovrig_information');
  363.     $arvode = $request->getParam('Arvode');
  364.     $rorligt = $request->getParam('Rorligt');
  365.     $arvodefakt = $request->getParam('Arvode_fakurerat');
  366.     $kundansv = $request->getParam('Kundansvarig');
  367.  
  368.     $forsakrform = $request->getParam('Forsakringsform');
  369.     $projektforsakring = $request->getParam('Projektforsakring');
  370.     $forsakrnr = $request->getParam('Forsakringsnr');
  371.     $fornydatum = $request->getParam('Fornyelse');
  372.     $forsakrb = $request->getParam('Forsakringsbolag');
  373.  
  374.     $premiekr = $request->getParam('Premie_kr');
  375.     $provpr = $request->getParam('Provision_procent');
  376.     $provkr = $request->getParam('Provision_kr');
  377.     $sarskildfaktrutin = $request->getParam('Sarskild_faktura_rutin');
  378.     $aps1 = $request->getParam('ARBETSPROCESS_STEG_1');
  379.    
  380.     $aps2a = $request->getParam('ARBETSPROCESS_STEG_2_A_FORNYELSE');
  381.     $aps2b = $request->getParam('ARBETSPROCESS_STEG_2_B_UPPHANDLING');
  382.     $aps3 = $request->getParam('ARBETSPROCESS_STEG_3_PLACERING');
  383.     $aps4 = $request->getParam('ARBETSPROCESS_STEG_4_ANDRING');
  384.     $arkiverad = $request->getParam('Arkiverad');
  385.  
  386.     // try it!
  387.     try {
  388.         // Might need to add some security to this..
  389.         // make query string
  390.         $sql = "INSERT INTO insurances (Organisationsnummer,
  391.                                        Koncern,
  392.                                        Organisationsnummer_Dotterbolag,
  393.                                        Dotterbolag,
  394.                                        Uppdragsavtalets_utgang,
  395.  
  396.                                        Ovrig_information,
  397.                                        Arvode,
  398.                                        Rorligt,
  399.                                        Arvode_fakurerat,
  400.                                        Kundansvarig,
  401.  
  402.                                        Forsakringsform,
  403.                                        Projektforsakring,
  404.                                        Forsakringsnr,
  405.                                        Fornyelse,
  406.                                        Forsakringsbolag,
  407.  
  408.                                        Premie_kr,
  409.                                        Provision_procent,
  410.                                        Provision_kr,
  411.                                        Sarskild_faktura_rutin,
  412.                                        ARBETSPROCESS_STEG_1,
  413.  
  414.                                        ARBETSPROCESS_STEG_2_A_FORNYELSE,
  415.                                        ARBETSPROCESS_STEG_2_B_UPPHANDLING,
  416.                                        ARBETSPROCESS_STEG_3_PLACERING,
  417.                                        ARBETSPROCESS_STEG_4_ANDRING,
  418.                                        Arkiverad) VALUES (?, ?, ?, ?, ?,
  419.                                                            ?, ?, ?, ?, ?,
  420.                                                            ?, ?, ?, ?, ?,
  421.                                                            ?, ?, ?, ?, ?,
  422.                                                            ?, ?, ?, ?, ?)";
  423.                                        
  424.         $pdo->prepare($sql)->execute([$orgnr,
  425.                                     $koncern,
  426.                                     $dottrb,
  427.                                     $orgdottrb,
  428.                                     $uppdrutg,
  429.  
  430.                                     $ovriginfo,
  431.                                     $arvode,
  432.                                     $rorligt,
  433.                                     $arvodefakt,
  434.                                     $kundansv,
  435.  
  436.                                     $forsakrform,
  437.                                     $projektforsakring,
  438.                                     $forsakrnr,
  439.                                     $fornydatum,
  440.                                     $forsakrb,
  441.  
  442.                                     $premiekr,
  443.                                     $provpr,
  444.                                     $provkr,
  445.                                     $sarskildfaktrutin,
  446.                                     $aps1,
  447.  
  448.                                     $aps2a,
  449.                                     $aps2b,
  450.                                     $aps3,
  451.                                     $aps4,
  452.                                     $arkiverad]); // chaining SQL statements..
  453.  
  454.         return $response->withJson(['response' => 'success', 'message' => 'Added insurance to database'], 200);
  455.     }
  456.     // did we get any errors?
  457.     catch (PDOException $e) {
  458.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  459.         //echo '{"error":{"text":'. $e->getMessage() .'}}'; //print a error
  460.     }
  461. });
  462.  
  463. $app->post('/editInsurance', function(Request $request, Response $response){
  464.     require_once(__DIR__ . '/dbstore/dbconnect.php');
  465.    
  466.     // get username and password
  467.     $id = $request->getParam('insuranceid');
  468.     $orgnr = $request->getParam('Organisationsnummer');
  469.     $koncern = $request->getParam('Koncern');
  470.     $dottrb = $request->getParam('Dotterbolag');    
  471.     $orgdottrb = $request->getParam('Organisationsnummer_Dotterbolag');
  472.     $uppdrutg = $request->getParam('Uppdragsavtalets_utgang');
  473.    
  474.     $ovriginfo = $request->getParam('Ovrig_information');
  475.     $arvode = $request->getParam('Arvode');
  476.     $rorligt = $request->getParam('Rorligt');
  477.     $arvodefakt = $request->getParam('Arvode_fakurerat');
  478.     $kundansv = $request->getParam('Kundansvarig');
  479.  
  480.     $forsakrform = $request->getParam('Forsakringsform');
  481.     $projektforsakring = $request->getParam('Projektforsakring');
  482.     $forsakrnr = $request->getParam('Forsakringsnr');
  483.     $fornydatum = $request->getParam('Fornyelse');
  484.     $forsakrb = $request->getParam('Forsakringsbolag');
  485.  
  486.     $premiekr = $request->getParam('Premie_kr');
  487.     $provpr = $request->getParam('Provision_procent');
  488.     $provkr = $request->getParam('Provision_kr');
  489.     $sarskildfaktrutin = $request->getParam('Sarskild_faktura_rutin');
  490.     $aps1 = $request->getParam('ARBETSPROCESS_STEG_1');
  491.    
  492.     $aps2a = $request->getParam('ARBETSPROCESS_STEG_2_A_FORNYELSE');
  493.     $aps2b = $request->getParam('ARBETSPROCESS_STEG_2_B_UPPHANDLING');
  494.     $aps3 = $request->getParam('ARBETSPROCESS_STEG_3_PLACERING');
  495.     $aps4 = $request->getParam('ARBETSPROCESS_STEG_4_ANDRING');
  496.     $arkiverad = $request->getParam('Arkiverad');
  497.  
  498.     // try it!
  499.     try {
  500.         // Might need to add some security to this..
  501.         // make query string
  502.         $sql = "UPDATE insurances SET Organisationsnummer = ?,
  503.                                        Koncern = ?,
  504.                                        Organisationsnummer_Dotterbolag = ?,
  505.                                        Dotterbolag = ?,
  506.                                        Uppdragsavtalets_utgang = ?,
  507.                                        
  508.                                        Ovrig_information = ?,
  509.                                        Arvode = ?,
  510.                                        Rorligt = ?,
  511.                                        Arvode_fakurerat = ?,
  512.                                        Kundansvarig = ?,
  513.                                        
  514.                                        Forsakringsform = ?,
  515.                                        Projektforsakring = ?,
  516.                                        Forsakringsnr = ?,
  517.                                        Fornyelse = ?,
  518.                                        Forsakringsbolag = ?,
  519.                                        
  520.                                        Premie_kr = ?,
  521.                                        Provision_procent = ?,
  522.                                        Provision_kr = ?,
  523.                                        Sarskild_faktura_rutin = ?,
  524.                                        ARBETSPROCESS_STEG_1 = ?,
  525.                                        
  526.                                        ARBETSPROCESS_STEG_2_A_FORNYELSE = ?,
  527.                                        ARBETSPROCESS_STEG_2_B_UPPHANDLING = ?,
  528.                                        ARBETSPROCESS_STEG_3_PLACERING = ?,
  529.                                        ARBETSPROCESS_STEG_4_ANDRING = ?,
  530.                                        Arkiverad = ? WHERE id = ?";
  531.                                        
  532.         $pdo->prepare($sql)->execute([$orgnr,
  533.                                     $koncern,
  534.                                     $dottrb,
  535.                                     $orgdottrb,
  536.                                     $uppdrutg,
  537.  
  538.                                     $ovriginfo,
  539.                                     $arvode,
  540.                                     $rorligt,
  541.                                     $arvodefakt,
  542.                                     $kundansv,
  543.  
  544.                                     $forsakrform,
  545.                                     $projektforsakring,
  546.                                     $forsakrnr,
  547.                                     $fornydatum,
  548.                                     $forsakrb,
  549.  
  550.                                     $premiekr,
  551.                                     $provpr,
  552.                                     $provkr,
  553.                                     $sarskildfaktrutin,
  554.                                     $aps1,
  555.  
  556.                                     $aps2a,
  557.                                     $aps2b,
  558.                                     $aps3,
  559.                                     $aps4,
  560.                                     $arkiverad,
  561.                                     $id]); // chaining SQL statements..
  562.  
  563.         return $response->withJson(['response' => 'success', 'message' => 'Updated insurance to database'], 200);
  564.     }
  565.     // did we get any errors?
  566.     catch (PDOException $e) {
  567.         return $response->withJson(['response' => 'failed', 'message' => $e->getMessage()], 200);
  568.         //echo '{"error":{"text":'. $e->getMessage() .'}}'; //print a error
  569.     }
  570. });
  571.  
  572. // $app->add(function ($req, $res, $next) {
  573. //     $response = $next($req, $res);
  574. //     return $response
  575. //             ->withHeader('Access-Control-Allow-Origin', 'http://127.0.0.1:8888/database/public')
  576. //             ->withHeader('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Accept, Origin, Authorization')
  577. //             ->withHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS');
  578. // });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement