how to define a variable in laravel blade -


how can define variable in view side(blade) in laravel? found can in way:

 <?php $var = 'something' ?> 

but there way {{ $var = 'something' }} or @var1 = 'something' ?(ofcourse without print it)

no, there no way define variable blade syntax except using php syntax have pointed. not practice define variables in views , complex stuff except loops , conditional statements


Comments