Replies: 3 comments 1 reply
-
Hi, thank you very much for the idea. Can you submit a PR for this solution?. As there are no break changes you can enter V3. Maybe we can rename it to redirect ? |
Beta Was this translation helpful? Give feedback.
-
After I wrote the feature request I noticed that |
Beta Was this translation helpful? Give feedback.
-
Just noted that this is already supported... just need to point to a route that have the parameter defined. tested with: On Route::view('/powergrid/{id}', 'powergrid-demo')->name('powergrid-id'); and this when defining the actions: public function actions(): array
{
return [
Button::make('info', 'Click me')
->route('powergrid-id', ['id' => 'id']),
];
} This was sufficient to get the links generated correctly. CONCLUSIONThe feature already exists |
Beta Was this translation helpful? Give feedback.
-
⚡ PowerGrid ⚡ Feature Request
Summary
Sample code:
Row action button generates links using URL parameters like
https://myapp.example.com/page?parameter=value
, would be great if there was a possibility to generate URL with a permalink style likehttps://myapp.example.com/page/value
Why is this needed?
Usual way to declare routes on laravel is like this:
Currently when using action button to launch such pages there is a need to create another route without the parameter and read it from the URL parameter on the template with the
request()->get('parameter')
instead of the usualrequest()->route('parameter')
Suggested Solution(s)
This could be made using non-associative array, like the sample code bellow:
Beta Was this translation helpful? Give feedback.
All reactions