How to deploy a Laravel project
Steps for Deployed laravel project
Create account & sign up
In the 000webhost home — Create a new web site
Click the home page displayed your web site name and — Goto File Manger and Uploads Files
After preview, the following page & Compress your zip and upload to root path “/ path”
Select compresed Zip File & Upload
After Extract uploaded Zip And Delete Zip File
Delete public_html folder. After rename your laravel public folder like = public_html
After goto App/Providers/AppServiceProvider.php and add following code to register function $this->app->bind('path.public',function(){return base_path('public_html');});
Open /.env
. Copy APP_KEY
value without base64:
Go to /config/app.php
, find 'key
' and replace the line with the following code: ‘key’=>env(‘APP_KEY’,base64_decode(‘%YOUR_COPIED_APPKEY%’));
Home -> database Manger -> create new databse & copy host name, Databse name,username and password
Paste(coppied Database details .env file)
Goto 000webhost home page & goto here
Finally, Website Deployed to 000webhost
My Deployed laravel project : https://simpletodoapp.000webhostapp.com/
Thank You!!!