T
T
ThreegunD2017-03-29 21:13:03
Laravel
ThreegunD, 2017-03-29 21:13:03

What needs to be changed before sending it to production?

What needs to be changed, removed before sending the laravel application to the production server?
I only know that in .env you need to change these parameters.
APP_DEBUG=false
APP_LOG_LEVEL=production
APP_URL= mysite.com
Is there anything else that needs to be changed besides setting databases and localization?
A couple of packages for debugging are also installed, as I understand it, in order to remove them painlessly, it is enough to remove the installed packages from the list of service providers. Or remove composer.json from the list

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2017-03-29
@wielski

A couple of packages for debugging are also installed, as I understand it, in order to remove them painlessly, it is enough to remove the installed packages from the list of service providers. Or remove composer.json from the list

All packages used for debugging during development should be in require-dev.
When migrating to production, among other things, you must correctly specify the REDIS settings (for caching) and the MAIL client (usually they use SMTP services like Sendgrid or Mailjet).
Also, do not forget to catch possible Exception so that the user does not see the gray Laravel block "Whoops, something went wrong".
Just in case, I advise you to register the view in App/Exceptions/Handler.php in the render method, reassigning the template in case of an unexpected error. If you use ajax requests, don't forget to issue a json response in case of an error, depending on the conditions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question