I have a table that I'm getting data from to output them. Table is consisted from bunch of personal data named as it follows - name, lastName, phoneNumber, email, birthYear, startedAt etc...
When I want to output the data inside my view on laravel, i fetch them without problem, but the things is, instead of writing each and every entry manually, i used loops. While using @foreach,
I just get the name of the table column that I've previously appointed, so basically, when I output values, I get "name" instead of "Name, "lastName" instead of "Last Name" etc. Also, I have some column names with just 3 letters like "pro" that can mean thousand of things.
So, how do I rename those keys so my output should be human readable?
@foreach($data->getAttributes() as $key => $value)
@if(!empty($value))
<tr><td>{{ $key }}</td><td>{{ $value }}</td></tr>
@endif
@endforeach