#### Category : environment-variables

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..

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.. Read more 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 ..

What I want: I want to display a message when the user is redirected back to the form page after a mail is sent. What I am doing Here is the code in my SendEmailController.php: return back()->with(‘success’, ‘Mail Sent !’); Here is my code in my view/index.blade.php: @if ($message = Session::get(‘success’)) <div class="alert alert-success alert-block"> .. Read more 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. .. Read more 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..