src/Concerns/InteractsWithSession.php
public function session(array $data)
    {
        $this->startSession();

        foreach ($data as $key => $value) {
            $this->app['session']->put($key, $value);
        }
    }
public function session(array $data)
    {
        $this->startSession();

        foreach ($data as $key => $value) {
            $this->app['session']->put($key, $value);
        }
    }
public function session ( array $ data ) { $ this -> startSession ( ) ; foreach ( $ data as $ key => $ value ) { $ this -> app [ 'session' ] -> put ( $ key , $ value ) ; } }
Set the session to the given array.

@param  array  $data
@return void
Set the session to the given array .