Rollback one migration at a time - coming to Laravel 5.3

New migration and blade features coming to Laravel 5.3

Taylor Otwell announced two new features coming to Laravel 5.3 on twitter today.  You will be able to roll back one migration at a time and you will have access to the $loop variable in blade foreach loops.

Rolling back one migration at a time

This new feature will come in handy when one of your migrations fail for some reason. You will be able to use it this way:

php artisan migrate:rollback --step=1


Blade $loop variable

In blade foreach loops you will have access to a $loop variable, it will allow you to do things like this, but knowing Taylor there will be a lot more available.

@foreach($users as $user)
    @if($loop->first)
        <!-- First iterartion -->
    @endif
    
    @if($loop->last)
        <!-- Last iteration -->
    @endif
@endforeach


Code credits go to Taylor Otwell & Laravel php