Reputation: 15
In my blade template I have a problem with a DB column with a blank space.
{{ $data->first name }}
doesn't work.
Is there any alternative solution?
P.s. I can't modify my column name.
Upvotes: 0
Views: 442
Reputation: 8252
You can use the following syntax to access the column:
{{ $data->{'first name'} }}
or
{{ $data['first name'] }}
Upvotes: 5