My laravel Application was working perfect on the local server. But After I uploaded it to my server it is not working. The directory structure of my application is shown in the following image:
And I am getting the following problem. It is automatically redirected to loopback address showing nothing
Here is my php version in the server
Application Backup Therefore, shared hosting is not an option for Laravel applications.
First, download the Laravel installer using Composer. Make sure to place the ~/. composer/vendor/bin directory in your PATH (or C:\%HOMEPATH%\AppData\Roaming\Composer\vendor\bin if working with Windows) so the laravel executable is found when you run the laravel command in your terminal.
Uploading Files in Laravel is very easy. First, we need to create a view file where a user can select a file to be uploaded and a controller where uploaded files will be processed. To upload a file in Laravel, use the Storage::disk (‘local’)->putFileAs ( ‘file name’) function.
Upload Laravel Project To Shared Hosting or Server. 1 Step 1 : Compress Project Files. Go to your Laravel project directory. We need to make two zip files. Make one zip file without public folder and ... 2 Step 2 : Upload Zip Files to Hosting. 3 Step 3 : Extract Zip Files. 4 Step 4 : Config index.php. 5 Note For Server.
Let’s follow these steps: Go to your Laravel project directory. We need to make two zip files. Make one zip file without public folder and named as ‘ framework.zip’. Then navigate to public folder and zip the contents as ‘ public.zip ‘. Login to your web hosting CPanel and navigate to the root folder.
If you are working on your laravel web app on server or deploying your laravel web app to a local machine server to live server ( laravel on linux ubuntu, laravel on windows). And you face any of the problem given below: Fatal error: Uncaught ReflectionException: Class config does not exist
Make sure you have correct web server configuration. You should point web server to a public
directory and restart it.
Also, make sure you've set correct permissions on a storage
directory:
chmod -R 775 storage
And try to clear all cache:
php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear
php artisan clear-compiled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With