66792/how-to-get-current-route-in-symfony-2
How do I get the current route in Symfony 2?
For example, routing.yml:
somePage: pattern: /page/ defaults: { _controller: "AcmeBundle:Test:index" }
How can I get this somePage value?
Hii,
The easiest way to do this:
class MyController extends Controller { public function myAction($_route) { var_dump($_route); } .....
Hope this works!!
Thank You!!
Hello @kartik, You could try the following: Route::controller('login','AuthController'); Then in ...READ MORE
Hello, Try this code: if (!function_exists('getallheaders')) { ...READ MORE
Hello, Here is a code sample of a good ...READ MORE
Hello @kartik, What you need to do is ...READ MORE
Hello, Generating a new CSRF token for each ...READ MORE
Hello, When the variable is passed as value ...READ MORE
Hey @kartik, You have to provide MySQL hostname, ...READ MORE
Hello kartik, Actually there are many functions that ...READ MORE
Hello @kartik, This will actually get the result ...READ MORE
Hello @kartik, Use $_SERVER['REQUEST_URI']. The URI which was given in ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.