I am trying to find the name of a previous route in Laravel 5.1. WITH:
{!! URL::previous() !!}
I get the route URL, but I'm trying to get the route name, as I get for the current page:
{!! Route::current()->getName() !!}
My client will not use other text for the "Thank you" page, depending on the page (registration page or "Contact" page), the user goes to the "Thank you" page. I am doing my best:
{!! Route::previous()->getName() !!}
But that did not work. I am trying to get something like:
@if(previous-route == 'contact') some text @else other text @endif
source share