Skip to main content

Posts

Showing posts from January, 2019

use for array

---Use it to print array @forelse ($users as $user) {{ $user }}  @empty  No User Found @endforelse --- use it to check if array is empty   @unless($array)      Array has no value @endunless

Loop variables Laravel 4.8

Property Description $loop - > index The index of the current loop iteration (starts at 0). $loop - > iteration The current loop iteration (starts at 1). $loop - > remaining The iteration remaining in the loop. $loop - > count The total number of items in the array being iterated. $loop - > first Whether this is the first iteration through the loop. $loop - > last Whether this is the last iteration through the loop. $loop - > depth The nesting level of the current loop. $loop - > parent When in a nested loop, the parent's loop variable.