laravel-enso/tables

tableData request not working if you use POST as method

Closed this issue · 0 comments

This is a bug.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

If you use POST as method for your table (because url for get is too long) the /tableData request fails

Steps to Reproduce

  1. Add the following line the a table config (tested with vendor/laravel-enso/people/src/app/Tables/Templates/people.json)
    "method": "POST",
  2. Change tableData route in vendor/laravel-enso/people/src/routes/api.php from get to post
  3. Open table

Expected behavior

Table is shown

Actual behavior

500 error for request: json_decode() expects parameter 1 to be string, array given
File: /var/www/html/vendor/laravel-enso/tables/src/app/Services/Data/Request.php
Line: 60