Sign In
Sign In

Deploy a Laravel App

Updated on 14 May 2024

You can find the step-by-step deployment guide here.

Hostman uses the following environment when building a Laravel application:

  • PHP: 5.6, 7.4, 8.1, 8.2, or 8.3, depending on the version you chose when creating the app
  • Composer

The default start command is:

php artisan serve --host=0.0.0.0 --port=8000

After the deployment, Hostman will automatically issue an SSL certificate and configure the app to work over HTTPS. However, Laravel may continue to generate HTTP links by default, which can cause errors when making AJAX requests or submitting forms.

To force HTTPS, add the following code to the app/Providers/AppServiceProvider.php file:

public function boot()
{
    URL::forceScheme('https');
}
Was this page helpful?
Updated on 14 May 2024

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support