adspace
Explain, how to get current environment in laravel 5?
Answer Posted / Tasleem Khan
To get the current environment in Laravel 5, you can use the app() global helper function and call the environment method of the Config facade. Here's an example:nn$env = app()->environment();nnThis will return the current environment (like 'local', 'testing', 'staging', or 'production'). You can then compare it with specific environments as needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers