How to quickly deploy your Laravel website or app on Heroku

The database config file on Larvel should look like this:'host' => getenv("DATABASE_URL")?.parse_url(getenv("DATABASE_URL"))["host"] : '','port' => getenv("DATABASE_URL")?.parse_url(getenv("DATABASE_URL"))["port"] : '','database' => getenv("DATABASE_URL")?.substr(parse_url(getenv("DATABASE_URL"))["path"], 1) : '','username' => getenv("DATABASE_URL")?.parse_url(getenv("DATABASE_URL"))["user"] : '','password' => getenv("DATABASE_URL")?.parse_url(getenv("DATABASE_URL"))["pass"] : '',3..Heroku relies on composer.lock to build the environment and pull the required packages..So if you need some libraries or extensions that are not built-in (e.g. gd library for images) and you cannot add them to your composer.json you can add them manually to the composer.lock file..Here is a step by step guide..Also, here you can find a list of available extensions for Heroku.4..Symlinks do not work..So don’t use the storage folder to save resources, better use a CDN.5.. More details

Leave a Reply