Skip to content

Instantly share code, notes, and snippets.

@mouyong
Last active June 24, 2018 20:53
Show Gist options
  • Select an option

  • Save mouyong/e40c705c4aa8dcea82cf1ee71bcae735 to your computer and use it in GitHub Desktop.

Select an option

Save mouyong/e40c705c4aa8dcea82cf1ee71bcae735 to your computer and use it in GitHub Desktop.
查看当前路由绑定中的参数名
// helpers.php
if (!function_exists('get_current_router_bind')) {
function get_current_router_bind_key() {
dd(key(array_reverse(last(last(debug_backtrace(0)[2])))));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment