Closed ClCfe closed 3 years ago
This is a feature request.
Hello,
when you use route($name, $parameters = [], $absolute = false) to retrieve a named route, it won't include the parent(s) directory(ies) (here, /subfolder/)
route($name, $parameters = [], $absolute = false)
route($name, $parameters = [], $absolute = false) returns readPath: "/users/tableData", instead of readPath: "/subfolder/users/tableData",
readPath: "/users/tableData",
readPath: "/subfolder/users/tableData",
as a consequence, the vueJS front sends ajax to https://domain.tld/users/tableData instead of https://domain.tld/subfolder/users/tableData
The problem occurs here: https://github.com/laravel-enso/tables/blob/master/src/Services/Template/Builders/Structure.php#L99 https://github.com/laravel-enso/tables/blob/master/src/Services/Template/Builders/Filters.php#L39 https://github.com/laravel-enso/tables/blob/master/src/Services/Template/Builders/Buttons.php#L85
I see two solutions to solve this:
route()
$absolute=true
Thank you
This is a feature request.
Hello,
when you use
route($name, $parameters = [], $absolute = false)
to retrieve a named route, it won't include the parent(s) directory(ies) (here, /subfolder/)route($name, $parameters = [], $absolute = false)
returnsreadPath: "/users/tableData",
instead ofreadPath: "/subfolder/users/tableData",
as a consequence, the vueJS front sends ajax to https://domain.tld/users/tableData instead of https://domain.tld/subfolder/users/tableData
The problem occurs here: https://github.com/laravel-enso/tables/blob/master/src/Services/Template/Builders/Structure.php#L99 https://github.com/laravel-enso/tables/blob/master/src/Services/Template/Builders/Filters.php#L39 https://github.com/laravel-enso/tables/blob/master/src/Services/Template/Builders/Buttons.php#L85
I see two solutions to solve this:
route()
to be$absolute=true
instead of hard-coded falseThank you