vendredi 23 mars 2018

Laravel5: Change PHP session to laravel

Change PHP session code to laravel session.

I want to put the item_code passed to the GET into the basket session when the value of status is exceeded by the basket.

I've tried, but I can not keep up with sessions. Help.

switch (trim($_GET['status'])) {
    case "":
        break;
    case "basket":
        if ($_GET['amount'] > 1) {
            for ($i = 1; $i <= $_POST['amount']; $i++) {
                $_SESSION['basket'][] = $_GET['item_code'];
            }
        } else {
            $_SESSION['basket'][] = $_GET['item_code'];
        }
        break;
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire