Complete BLoC with Clean Architecture (group chat) Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Discount !! Online Learning Course App (BLoC) Online Learning Course App (Riverpod) Online Learning Course App (Getx) Discount !! Shopping App (Provider) Cool Flutter Game Nodejs Flutter Complete App
If you want to use a php variable in Laravel blade engine, you can do like this. Add this
@php($x=0)
in your blade , where x is your variable. You can initialize as you want. You can use the variable on the blade, even use it as an increment or decrement.
If you want to use $x in your blade in foreach use like below
@foreach($var as $v)
{{$x++}}
@endforeach
Of course you can also do
{{$x--}}
You must not forget to use double curly braces.