How to do I encrypt the Url in edit action. #397
Replies: 1 comment 1 reply
-
public function addColumns(): PowerGridEloquent
{
return PowerGrid::eloquent()
->addColumn('id')
->addColumn('encrypt', fn (Customer $customer) => Crypt::encrypt($customer->id))
...
Button::add('edit')
->caption('Edit')
->route('customer-edit', ['id' => 'encrypt']), |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
luanfreitasdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How I add the $loop->index values in ID column. I don't want to use database table primary id values in the table row number.
I need to use encrypted URL , So please help me to how to encrypt the edit route parameter.
please help me.
like => Button::add('edit')
->target('')
->caption('')
->class(' cursor-pointer text-sky-600 px-3 py-2.5 m-1 rounded text-sm')
->route('customer.edit', ['url' => [ 'id' , Crypt::encrypt($id);]]),
how I don't have any idea , please help me.
Beta Was this translation helpful? Give feedback.
All reactions