Problem
And I got the error message Parse error: syntax error, unexpected '<'
It looks like the variable can`t be read.
How to set the value in the for-loop inside the blade?
Solution
So what you need to do is to have this {{ $last = date('Y')-120 }}
in first part. With {{ $var }}
You are printing the value but you need to assign the value. So assign like this :
The same thing goes for the for a loop too. Just compare the value. Do not put it in blade syntax. You shouldn’t mix the two.