Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Understanding how REST controllers work
  • I was wondering about REST controllers.
    1- do i have to modifying the config routes file to point sitemap.xml => sitemap ?
    2- I have a script generated variable that contains the xml. should that just be echoed or is there a better way to do it?
    thanks
  • It may be a good idea for you to start by exploring the 'Controller_Rest' class: http://docs.fuelphp.com/general/controllers/rest.html You will see that this class can help you automatically generate appropriate REST responses directly from your models, in a variety of formats - xml, json, csv and even as an html table. Once you understand how the 'Controller_Rest' class is supposed to work, you may also want to have a look at this report, as it may help you setup your REST controller in a totally 'RESTful' way: https://github.com/fuel/core/issues/649

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • Knud November 2011