How to get the URI resource from a giving route name?

Posted 10 months ago by malhayek

I have a route named which is mapped to the following URI api/assets/v2/show/{asset}. I can see that info available in the php artisan route:list.

I am looking for a way to obtain the api/assets/v2/show/{asset} string when is giving.

In the ResourceRegistrar.php file I can see a method called getResourceUri() which seems to be what I am looking for.

But, how can I call this method from inside my view?

I tried adding the following to my blade view {{ Route::getResourceUri('') }} But that is giving me the following error

Attribute [getResourceUri] does not exist.

Any idea on how to get the URI resource from a giving route name?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.