'how upload laravel folder (with view files in public folders) to server

My laravel project has view files in public folders that are extended from resource folders. The problem is when I upload to infinityfree server. I upload the folder structure as follows.

htdocs -> all files in public folder . -> laravel -> All laravel project files

so index file need to edit

if (file_exists($maintenance = __DIR__.'/laravel/storage/framework/maintenance.php')) {
    require $maintenance;
}

The problem is that cannot find view files in the public folder. server says it cannot access to view files in public folder -> themes folder

enter image description here

if upload all folders directly into htdocs, it says 403 error.

So how can upload this laravel app?

here is folder structure enter image description here

here is directory listing after edit htacess file. enter image description here

how edit to see website directly, here is env file

APP_URL=http://learnerschool.epizy.com
APP_DEBUG=true
IS_DEMO=false




Solution 1:[1]

  1. Put all files to /public_html / htdocs or other folder when you must upload files
  2. Create .htacces file in this folder
  3. Copy this code to .htaccess file
<IfModule mod_rewrite.c>

   RewriteEngine On

   RewriteCond %{REQUEST_FILENAME}  -f [OR]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ public/index.php [L,QSA]

</IfModule>

Screen with my publc_html folder structure:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Filip Krzy?anowski