Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Pass data from yaml to php

Started by Luca Caputo 6 years ago · 0 replies · 687 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 Sergi, 2 days ago
1 74 2 days ago
General · by themetman, 5 days ago
2 95 4 days ago
General · by Hanns Mattes, 2 weeks ago
0 148 2 weeks ago
General · by Karmalakas, 2 weeks ago
2 221 2 weeks ago
General · by Hanns Mattes, 4 weeks ago
0 282 4 weeks ago