• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference between Add and Get in route

#1
What is the difference between $Routes->get and $Routes->add
Reply

#2
(03-03-2020, 02:26 AM)seunex Wrote: What is the difference between $Routes->get and $Routes->add
From what i understand add() just adds a 'universal' route (for get, post etc calls) and get() ads a route for $_GET requests (used with RESTFULL  API for example)
Reply

#3
add makes it available across all HTTP verbs, while get will only respond to GET requests. You'll have better security to limit each route only to the HTTP verb that it needs, so I would recommend NOT using add() personally.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.