Skip to content

Instantly share code, notes, and snippets.

@gharabaghi
Last active February 2, 2021 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gharabaghi/b2cf08baf01cdf15953600f91e140edc to your computer and use it in GitHub Desktop.
Save gharabaghi/b2cf08baf01cdf15953600f91e140edc to your computer and use it in GitHub Desktop.
i used this script to convert laravel old style routes to new pattern. this works on phpstrom
in php storm, bring replace bar (ctrl + R) and check 'Regex' box and then enter these values:
in firt input (for find):
'([^ ']*)\\([^ ']*)@([^ ']*)'
in second input (for replace):
[Controllers\\$1\\$2::class, '$3']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment