Route -> get Path like in Route?

Posted 1 month ago by baeckerman83

Hi! When I use Route::resource('photos', 'PhotoController');

in my Route file, I also kan use photos/create, photos/1 and so on. Can I get the path original like in the route file? So if the user tips in photos/create I only would like to have photos in the variable. With Route::getCurrentRoute()->getPath(); I get the full path photos/create But I need id like in the web.php file. Is this possible?

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

Reply to

Use Markdown with GitHub-flavored code blocks.