How to get route method name in Laravel

You can get route method name in Laravel using method() method on request() in Laravel. You can simply use request() helper method in controller or view file to get the method (GET/POST/PUT/PATCH/DELETE) of route in Laravel

Answers 1
  • Get route method on visit url in laravel

    request()->method()
    
    0

    Output:

    GET

    It helps you to get the method of route in laravel. You can use code snippet in routes\web.php, controller and view file.

  • Back to code snippet queries related laravel