Support the ongoing development of Laravel.io →
posted 10 years ago
Views
Last updated 2 years ago.
0

The answer to this question is:

Route::getCurrentRoute()->getAction()

Which returns something that looks like:

array (size=6)
  'before' => string 'auth' (length=4)
  'as' => string 'test' (length=4)
  'uses' => 
    object(Closure)[138]
  'controller' => string 'HomeController@getTest' (length=22)
  'namespace' => null
  'prefix' => null

Hat tip to Barryvdh from here:

http://forumsarchive.laravel.io/viewtopic.php?id=10095

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

sbarre sbarre Joined 13 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.