Answer the question
In order to leave comments, you need to log in
`
How to make associations of this kind?
How to make so that when the value is `
{{$lot->fuel}} = 1Displayed "petrol";
Answer the question
In order to leave comments, you need to log in
1) if there can be many such types - a table across the road
2) if there are only two - make a helper that will compare the key in the argument with the internal array and return the value
If Lot is a separate model, then you can make an array constant there
const FUEL_TYPES= [
1 => 'Бензин',
2 => 'Дизель',
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question