我试图在Laravel 5.1中找到之前路由的名称.
{!! URL::previous() !!}
我获得了路由url,但我试图获得与当前页面相同的路由名称:
{!! 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() !!}
但那没用.我试着得到这样的东西:
@if(previous-route == 'contact')
some text
@else
other text
@endif