How to use variable in blade template in controller in laravel code example Example: blade set variable @php ($i = 1)