public static function pull(string $key)
  {
    if (Self::has($key)) {
      $value = Self::get($key);
      Self::forget($key);

      return $value;
    }

    return null;
  }
public static function pull(string $key)
  {
    if (Self::has($key)) {
      $value = Self::get($key);
      Self::forget($key);

      return $value;
    }

    return null;
  }
public static function pull ( string $ key ) { if ( Self :: has ( $ key ) ) { $ value = Self :: get ( $ key ) ; Self :: forget ( $ key ) ; return $ value ; } return null ; }
Retrieve and remove

@param string $key
@return mixed
Retrieve and remove