In this tutorial i will give you information How To Get env Variable In Controller Or File many time we need to required of env variable in controller and blade file like if you are creating paypal integration then you have stored app id and secret key in env file.But if you haven’t any idea how to get it in controller or blade file.
So, let’s check how to get those variable data from .env file.
#laravel #laravel7 #laravel8 #blade #controller #env
In this tutorial we will learn How To Get env Variable In Controller Or Blade File, we will simply get env variable and print variable by using env() helper. Syntax: env('VARIABLE_NAME');