Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Pass data from yaml to php

Started by Luca Caputo 6 years ago · 0 replies · 458 views
6 years ago

hi everyone, I have a yaml file which returns an API. like this in example:

MYAPI: "https://prova1api.herokuapp.com/RedHotCHiliPeppersDiscography"

I would like to take MYAPI and pass it in a php file, like this in example:

$ api_data = json_decode ($ MYAPI, true);
$ this-> grav ['twig'] -> twig_vars ['api_data'] = $ api_data;

last edited 07/23/20 by Luca Caputo

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 days ago
2 84 2 days ago
General · by Andy Miller, 7 days ago
0 147 7 days ago
General · by Veehem, 1 week ago
0 146 1 week ago
General · by milkboy, 1 week ago
0 144 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago