0
            orderable: true,
            data: "null",
            width: '300',
            autoWidth: true,
            'text-align': 'center',
            render: function(data, type, full) {

                var encrypt_order_id = '{{ Crypt::encrypt('.full.id.') }}';
            }

How could i encrypt this 'full.id' using Laravel 'Crypt'

  • You can't; `full.id` would need to be encrypted before it gets to this Javascript call. You can't use `full.id` (a JS variable) inside of a PHP function (`Crypt::encrypt()`). – Tim Lewis Oct 27 '22 at 17:11
  • you have to make a post request to controller for using laravel crypt inside javascript and then return the encrypted data (for which idk why you're doing that). explain a little more what you're trying to do will help. – Sumit kumar Oct 27 '22 at 17:59

0 Answers0