Skip to content

Instantly share code, notes, and snippets.

@anistark
Last active February 4, 2017 07:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anistark/faaa6cfa07eee89d5425 to your computer and use it in GitHub Desktop.
Save anistark/faaa6cfa07eee89d5425 to your computer and use it in GitHub Desktop.
Packaging of Laravel website
So, you're done making the website or web-app and now you would wanna distribute it to your clients. Awesome. Let's go ahead and create a package for the same.
There are two types of packaging that can be done in laravel:
1. VPS
2. Shared
VPS
VPS version is for their own use and local testing. So, you would wanna keep it as close to your local system settings as possible.
1. Delete all the files from app/storage/ in the following folders:
cache
logs
session
views
2. Change your database settings in app/config/database.php to default.
3. Change your mail settings to default in app/config/mail.php and also make sure to delete your personal settings.
4. If you've a local folder in your app/config make sure to delete that.
SHARED
Shared versin is the one which e generally upload on any server as production. That doesn't mean the VPS version won't run on production server. It will. But it's a good practice not to.
1. Do all the steps as in VPS version.
2. Copy all the files in /public/ folder and paste in the root directory, i.e. the place where your server.php lies and delete the public directory forever.
3. Change the path in /bootstrap/paths.php for 'public' and point it towards the root directory.
4. Sometimes, you might have to change the path of your bootstrap files in your index.php file and point it to your root directory too.
And you're all set to go. :) Happy Coding!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment