I try to find name of previous route in Laravel 5.1. With:
{!! URL::previous() !!}
I get the route url, but I try to get route name like I get for current page:
{!! Route::current()->getName() !!}
My client wont a different text for Thank you page, depends on from page (Register page or Contact page) user go to Thank you page. I try with:
{!! Route::previous()->getName() !!}
But that didn't work. I try to get something like:
@if(previous-route == 'contact')
some text
@else
other text
@endif