Welcome Guest, Not a member yet? Register   Sign In
Setting and Getting Session and Flashdata
#4

(This post was last modified: 09-26-2019, 02:20 AM by Digital_Wolf. Edit Reason: added link )

full simple example for CI4:

PHP Code:
<?php
namespace App\Models;

use \
Config\Services\session;

class 
My_Model
{
     private session null;
     
     
public function __construct() {
           $this->session = new session();
     }
     public function setDataSession($data) {
           // ... you code
           $this->session->set$data );
           // ... you another code
     }


Official guide to using the session library: User_Guide
I would change this world, but God doesn't give me the source.
Reply


Messages In This Thread
RE: Setting and Getting Session and Flashdata - by Digital_Wolf - 09-26-2019, 02:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB