Skip to content

Instantly share code, notes, and snippets.

@Ademking
Created April 12, 2019 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ademking/69a4c4637eede5002d09a76563827d11 to your computer and use it in GitHub Desktop.
Save Ademking/69a4c4637eede5002d09a76563827d11 to your computer and use it in GitHub Desktop.
Deploy Laravel (voyager project)
  1. create a new folder that contains every file (except public folder) in ~

  2. upload public folder (the content of folder) to public_html/

  3. install composer inside folder : curl -s https://getcomposer.org/installer | php

  4. create a new database & user

  5. modify .env with MYSQL info

  6. run : php composer.phar install

  7. modify public/index.php :

  • change :
require __DIR__.'/../<< FOLDER NAME HERE >>/vendor/autoload.php';
$app = require_once __DIR__.'/../<< FOLDER NAME HERE >>/bootstrap/app.php';
  • add this after $app :
// set the public path to this directory
$app->bind('path.public', function() {
    return __DIR__;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment