Skip to content

How to do I encrypt the Url in edit action. #397

Answered by luanfreitasdev
mani1430 asked this question in Q&A
Discussion options

You must be logged in to vote
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']),

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mani1430
Comment options

Answer selected by luanfreitasdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants