controller parameters($params,$data,$request) explanation?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • worldmiros
    Senior Member
    • Dec 2015
    • 120

    controller parameters($params,$data,$request) explanation?

    I think I understand the $request based on externalaccount, but can you explain $params and $data parameters, and how would I use it on the client and server side?
  • tarasm
    Super Moderator
    • Mar 2014
    • 573

    #2
    When I edit an Account it will be a request (PATCH) to http://172.20.0.4/espo/releases/4.1....2891ba9c4bc501 with payload data "{"name":"Test"}".
    So, the parameters (var_dump):

    PHP Code:
    $params = array(3) {
      ["controller"]=>
      string(7) "Account"
      ["id"]=>
      string(17) "5772891ba9c4bc501"
      ["action"]=>
      string(5) "patch"
    } 
    
    PHP Code:
    $data = array(1) {
      ["name"]=>
      string(4) "Test"
    } 
    
    PHP Code:
    $request = object of Slim\Http\Request 
    
    Job Offers and Requests

    Comment

    Working...