Skip to content

Instantly share code, notes, and snippets.

@gayanvirajith
Created August 27, 2018 12:20
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 gayanvirajith/5878b5c3bdad67e21f87e02cc0732688 to your computer and use it in GitHub Desktop.
Save gayanvirajith/5878b5c3bdad67e21f87e02cc0732688 to your computer and use it in GitHub Desktop.
Laravel php storm regex search and replace

When we upgrade our laravel version from 5.1 to 5.2 We must replace out $request parameter accsss with a different method, we need replace our current access method eg: $request->id to something new like $request->input('id). So we used to it using phpStorm reqular expression search/replace feature. We have tried following way:

text to replace : (\$request)(\->)([\w]+)

replacement : $1\->input(\'$3\'\)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment