code: public function getAttribute()
      {
          return function ($next, $value, $args) {
              $key = $args->get('key');
  
              if (is_null($value)) {
                  $value = $this->getMeta($key);
              }
  
              return $next($value, $args);
          };
      }
docs: Register hook on getAttribute method.
  
  @return \Closure