0

I have upgraded Laravel from 5.2 to 5.5. All seems ok except one error Method getPath does not exist.. I can't see any trace hence unable to figure out why and where it is throwing this error. This is not coming everytime but sometimes.

Any help will be appreciated.

Tahir Awan
  • 64
  • 3
  • You're providing way too less information. Paste the entire stacktrace, or a screenshot of the full error page. – Propaganistas Nov 08 '17 at 12:06
  • Please provide full error – AddWeb Solution Pvt Ltd Nov 08 '17 at 12:07
  • Thanks for the comment. As I mentioned there is no stack trace of this error, that is the reason I am unable to figure out. I never got this error in `development`. I am getting this only on `Production`. Errors are logged in loggly and for this error unfortunately, there is no stack trace. – Tahir Awan Nov 08 '17 at 12:25
  • Sounds like it has something to do with routing – Vishal Nov 08 '17 at 12:40
  • Make sure you update all dependencies too along with any other third party packages if you are using any. – Vishal Nov 08 '17 at 12:45

1 Answers1

0

Change

Route::getCurrentRoute()->getRoute();

To

Route::getCurrentRoute()->uri();
4b0
  • 21,981
  • 30
  • 95
  • 142
Dazzle
  • 2,880
  • 3
  • 25
  • 52
  • 1
    Add some explanation to avoid this post to consider as low quality post by `stackoverflow`. – Harsha Biyani May 28 '19 at 11:47
  • I'm pretty sure getRoute was deprecated but didn't want to make any assumptions and don't know for sure which version. The fix works in Laravel 5.8 – Dazzle May 28 '19 at 11:58