New to Laravel. Taking over development.

Posted 3 years ago by bubbawny

Hi folks:

I'm new to laravel, but I'm an experienced developer.

I have recently been asked to take over a laravel project where the prior two developers have left.

I have created a development VM on VirtualBox. I've made copies of the two laravel web applications, including downloading all the application files and the mysql databases. I have successfully setup both applications to run locally on Apache 2.4 w/MySQL. I've modified my HOSTS file so that the domains resolve to LOCALHOST. I've got PHPStorm up and running along with XDEBUG. It's fully operational, and the sites (laravel apps) work locally.

But being new to Laravel, I do have a couple of questions.

When I use Phpstorm and xdebug and step through the app locally, the environment on one app picks up that it's a production environment. The other picks up that it's a staging environment. I see that there are many supporting configuration files (including database configuration PHP files) that are called depending upon the set environment.)

One app has a file in HTTPDOCS called .env.prod.php. I'm honestly not sure if I created this file during the installation of laravel or not (issuing an artisan command). But it does have the db settings I need for the app to connect to my local copy of the db.)

What I need to know is:

How do you change environments (say from production to staging, or visa versa. I don't see any .enc files any where in the directories of either app. How do you tell the application to be 'staging' or 'production'?

(I've got both apps as subdirectories in var/www. var/www/app1 and var/www/app2. I figured out how to ensure the app/storage directors have proper permissions. At first, this stymied me. but I got the permissions set right and then the apps started running locally).

sorry for the simple question. I've gone through a lot of hoops to pick up where the prior devs left off with no help from them. (Sionara! See you later, beyatch! Have fun storming the castle!)

I'm proud of having gotten the two sites operating locally in the dev VM I created.

now I'm trying to just figure out some laravel basics (like how to set which environment settings to use for each app). I'm beginning the learning process to then pick up the development where they left off. I've got a bit to learn yet. but so far, it seems pretty straight forward.

googling this seems to indicate that there must be some .enc files some place. but I don't have any in either of the application directories.

Hoping someone may be willing to shed some light on this.

Thanks in advance.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.