Reputation: 5361
route('products.create')
returns full path like http://myapp.dev/products/create
.
How do I get the actual route? Only this -> products/create
?
Upvotes: 1
Views: 50
Reputation: 12438
There is no such functionality provided by Laravel at this point. However, you may try this:
$extra = URL::to('/');
$actual = route('products.create');
str_replace($extra, '', $actual);
That will remove the unnecessary base URL from your route URL.
Upvotes: 2