Closed Synchro closed 3 years ago
Yes, you can use computed field :
Qrcode::make('URL', function () {
return url($this->string_column);
// http://localhost.test/goto/{value}
// or
return 'https://example.com/qr/' . $this->string_column;
// https://example.com/qr/{value}
}),
Perfect, thanks
I have a field that contains an identifier string, but not a whole URL. I'd like to be able to generate the full URL on the fly from the field, so if my field contains
abc123
, I'd like to be able to build it into a URL likehttps://example.com/qr/abc123
. Is there some way to dynamically alter the field value before it gets rendered, via a closure or something?