I tried to deploy a fresh laravel application. I installed a laravel 5.8 and upload to github repository.
The repository or project folder is working since I tried to run php artisan serve
and it successfully shows the laravel home screen page.
I tried to connect in my shared hosting using ssh.
Here's the steps that I've done:
- Access thru ssh
- create a project folder
mkdir my-assignment-calculator
then cd my-assignment-calculator - Clone project repository.
git clone **repo_url**
- Navigate the project folder,
cd my-assignment-calculator
- Copy .env file,
cp .env-example .env
- Install composer packages.
composer install
- Then copy all files in
Public
folder to public_html folder - Go to public_html then update index.php,
nano index.php
- In index.php, I update these two lines, the vendor/autoload.php and the bootstrap/app.php
Here's the sample code for #9:
require __DIR__.'/../my-assignment-calculator/my-assignment-calculator/vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once
__DIR__.'/../my-assignment-calculator/my-assignment-calculator/bootstrap/app.php';
Here's the structure of my project folder
-public_html
-domains
--my_assignment_calculator
--my_assignment_calculator
---laravel files
The current output is only white screen. I tried to check the developers tools or devtools, there's no error. It's just a white background. It's the same as before.
So what is the expected output
Should display laravel welcome or home screen page
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2V8ex0U
via IFTTT
Aucun commentaire:
Enregistrer un commentaire