H
H
hrvasiliy2016-09-14 17:22:51
IDE
hrvasiliy, 2016-09-14 17:22:51

How to properly develop in PhpStorm?

A copy of the project is stored locally, changes are uploaded to the server by pressing ctrl+s. It is often necessary to execute various commands using artisan. If the commands are executed on the server, then you need to manually download new files in PhpStorm, if locally, then again you have to manually upload new files to the server.
Interested in how, in this case, to develop a project on Laravel using PhpStorm?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim, 2016-09-14
@hrvasiliy

Tools->Deployment->Options Check
the Prompt when overr ..... Check
Automatic Upload in Tools->Deployment
As a result, after changing the branch / code generation / tdtp, the changes are sent to the server.
Development on a remote server is needed only if your project is complex and it is difficult to deploy a full-fledged working version. For example microservices. When there are 20+ of them, it is difficult, and sometimes impossible, to raise a full-fledged application on a local wheelbarrow, there will not be enough resources.
Never pollute your host machine. Use vagrant + any devops software. The easiest is to use puphpet . Use vcs( git/svn/mercurial) for application version control.
Deploying can be done in different ways, there is something for everyone here, from building on a local wheelbarrow and uploading via scp to CI (gitlab, capistrano, jenkins), this is a topic for another question.
PS: also, if you are not developing on Windows (better get out of the habit right away), then you can mount the nfs directory, which will automatically load your changes, but already at the operating system level, not the IDE.
UPD: d3e6b0993ce2438a8e419ecb9c22b161.png
UPD2: By development on the server, I meant the development server\container.
UPD3: Upload External Changes should upload changes from the server, but in my opinion it didn’t work for me via ssh, I don’t remember exactly, you can try =)

R
Roman Sokharev, 2016-09-14
@greabock

That's right - use a version control system. For example git.
If it is absolutely correct, then for the deployment you need to use the appropriate tool (for example, Capistrano or any other analogue).
For the poor, you can set up a banal hook.
When pushing (or merging), let's say to the master, a hook flies to the working server. The hook handler, in turn, will pull all the changes from the version control system repository, and run all the necessary commands (migrations, cache warming, and in general everything your heart desires).

V
Victor, 2016-09-14
@v_decadence

Properly develop locally

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question