public function setKey($key)
    {
        $this->key = $key;

        // Initialize if we're the first instance.
        if (! session()->has('bzarzuela.filters')) {
            session(['bzarzuela.filters' => [$key => []]]);
        }

        return $this;
    }
public function setKey($key)
    {
        $this->key = $key;

        // Initialize if we're the first instance.
        if (! session()->has('bzarzuela.filters')) {
            session(['bzarzuela.filters' => [$key => []]]);
        }

        return $this;
    }
public function setKey ( $ key ) { $ this -> key = $ key ; // Initialize if we're the first instance. if ( ! session ( ) -> has ( 'bzarzuela.filters' ) ) { session ( [ 'bzarzuela.filters' => [ $ key => [ ] ] ] ) ; } return $ this ; }
Sets a unique key to hold the filter form data in the session.
@param string $key Key name. Usually the model's table name
Sets a unique key to hold the filter form data in the session .