I want to add a single quote in the .env file but nothing of the following seems to be working: ALL_VIDEOS=AppModelsVideo::where(‘video_type’, ‘=’, ‘Free’)->get(); ALL_VIDEOS=AppModelsVideo::where(”video_type”, ”=”, ”Free”)->get(); Sourc..
Category : environment-variables
We have an application that users can switch between Sandbox and Live environment. Depending on the environment they are in, the application is supposed to use different env file credentials. At the moment, we deployed the Sandbox and the Live application separately but managing them is stressful. Do you have any suggestion on how we ..
There is no problem on the local server, everything works. Mail’s is can sendable, when I deploy my website to GoDaddy I got this error: Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to tcp://smtp.gmail.com:587 (Network is unreachable) My .env is; MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=2021365. MAIL_ENCRYPTION=tls [email protected] MAIL_FROM_NAME="${APP_NAME}" Sourc..
In laravel, the environment variables are stored in the .env file and later assigned to the $_ENV superglobal variable. What should I do if I want the same function (get the variables in the .env file). I tried researching but my efforts are in vain… Sourc..
Here is my problem, I am dealing with it for a days, and any help is greatly appreciated. I am developing a project using Laravel, on a Windows 10. I have installed NodeJS, NPM works just as expected, and also when I check node -v through CMD or PowerShell it shows current version. So, my ..
I am new in programming.I mistakenly changed my env file from production server into the local env file in my Laravel project. I created a new env file, filled the data about DB, made php artisan key:generate, started the commands: php artisan config:clear php artisan route:clear php artisan view:clear php artisan cache:clear composer dump-autoload But ..
My customer wants that i create multiple env files according to the url so that we only have the project in one main folder. The user will access example.software.com and the laravel framework detects the url and creates and env file for that subdomain. The goal is that when the env file is created the ..
i have some domains that parked on one laravel base system, example: domain1.com domain2.com app_url in .env set to domain1.com When open domain2.com or domain3.com all of files & images open with url domain1.com. I want to when domain2.com open then files & images load in domain2.com. i use this code in config/filesystems.php replace ‘public’ ..
We use Laravel and have multiple subdomains/domains set up in our servers for different clients. Most of the .env parameters – API urls, DB configurations etc are the same for all clients. Some parameters such as hashing keys may be different. Is it possible to store common parameters in one ‘global’ .env file,’source’ them from ..
I am debugging env vars with Laravel 8 in production. In local, I have no problem. In production, when I do: dd(env(‘DB_CONNECTION’), I get null, but my app works, which means it is connecting to the DB. Why isn’t it working ? I tried to clear all caches with php artisan optimize, with no success. ..
I’am trying to retrieve EXAMPLE_URL=www.google.com from .env in controller and everytime get null. Where is the problem because the same code works on another application. This function doesn’t work after config clear cache. Controller code $hostname = env("EXAMPLE_URL"); dump($hostname); Sourc..