Now I need to make an action which will redirect to a different URL depending on the value in that columns TipoExp.
I have tried this:
->url(function (Persona $record){ switch ($record->tipoExp) { case 'Herencia': return 'expedientes-herencia/' . $record->id; break; case 'Compra-Venta':...
->url(function (Persona $record){ switch ($record->tipoExp) { case 'Herencia': return 'expedientes-herencia/' . $record->id; break; case 'Compra-Venta':...
But it is returning nothing. It looks as if $record->tipoExp has nothing inside. I have also tried to access through the related relationship, but it is not working either: