How to retrive current environment in laravel?



How to retrive current environment in laravel?..

Answer / Nishu Agrawal

To get the current application environment in Laravel, use the `app()` helper function and call the `environment()` method on the Application instance:
`$env = app()->environment();`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What are accessors and mutators in eloquent and why should you use them?

1 Answers  


How to register a middleware in laravel 5?

1 Answers  


What is laravel best for?

1 Answers  


What is meant by Modularity ?

1 Answers  


What do you mean by binding in laravel?

1 Answers  


What is middleware in laravel?

1 Answers  


What is a Laravel - Contracts ?

1 Answers  


How to get current environment in laravel 5?

1 Answers  


What is a service supplier?

1 Answers  


Tell me how to enable maintenance mode in laravel 5?

1 Answers  


Explain how to list all routes in laravel?

1 Answers  


What is a Laravel - Ajax ?

1 Answers  


Categories