Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By pratiikstha on
I tried doing:
use \Drupal\Core\Entity\EntityInterface;
use \Drupal\Core\Entity\Query\EntityQueryInterface;
use Drupal\node\Entity\Node;
use Drupal\field\FieldConfigInterface;
$query = \Drupal::entityQuery('api_detail')
->condition('status', 1);
$nids = $query->execute();
$node = Node::node($nids);
But, when I load the page, it prompts an error:
"The website encountered an unexpected error. Please try again later."
Can anyone please help?
Thanks
Comments
You can try
You can try