I am using Laravel 5.5 & have Items table with more than 50 columns set as Tinynt to store values.
Item::where('id',$id)->first();
Now in my view I want to replace all integer values to corresponding String like
if($item->column1 == 1) { $value = 'String1'); }
if($item->column1 == 2) { $valuee = 'String2'); }
& so on. I know I can use Laravel Mutator but I have more than 50 columns & settings Mutator will not solve my issue. My problem is some related to this post but problem is number of columns.
Any solution please ?
1=>'String1',2=>'String2'
and use that if you insist on not using Mutators.