Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

LunarDerrick's avatar

InfinityFree Hosting Issue: InvalidArgumentException view not found

Website URL: littlesmartdaycare infinityfreeapp com

I am currently hosting my website on IF(infinityfree) subdomain.

This is the error I am running into. I googled and asked ChatGPT, all suggested that my controller is unable to locate my blade view, index.blade.php. However, I tested in my local environment and it ran successfully, then I uploaded my folder as is to IF filemanager via WinSCP. I understand that IF lack the command CLI to run compile & caching, so I did all that in my local machine then upload the updated files(Please let me know if this is incorrect, I am still inexperienced on this subject).

I will provide as much relevant code snippet as I believe so below:

index.blade.php

PostController.php

web.php

<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PostController;
use App\Http\Middleware\CheckSessionTimeout;

Route::middleware([CheckSessionTimeout::class])->group(function () {

    Route::get('/', [PostController::class, 'indexHome']
    )->name('index');

});

Extra Question: have you check your .env config and recache your config?

Answer: I did check .env as ChatGPT suggested before, as shown here

.env

On a side note, the reason I keep my env as local is due to my settings here:

AppServiceProvider.php

And for people who want me to double check my uploaded directory, here are my screenshots: (I am unable to post link on first day, I'll think of a solution in a while)

These are all the relevant info I can think of, please let me know how can I assist in pointing out the root cause. Thank you.

0 likes
3 replies
Tray2's avatar

Make sure that

  1. You have the document root set to /public
  2. Make sure that you have mod_rewrite enabled if it served by apache.
  3. Make sure that the index.blade.php file is in resources/views
LunarDerrick's avatar

@Tray2

  1. I am aware of that, infinityfree hosting defaults root to /htcdocs which is where I placed my folders, however I need to direct all request to /public for my index.php to boot laravel.
  2. I am uncertain what provider infinityfree is using, given that I use xampp in my local testing environment, I am most likely using apache default settings.
  3. I received a lot of similar suggestions in other forums when I was desperate, and I have validated several times my files exist.

Thank you for your response, I appreciate it!

LunarDerrick's avatar
LunarDerrick
OP
Best Answer
Level 1

I finally traced the issue from the new observation.

Source issue: /htdocs/bootstrap/cache/config.php

Even though I manually cached & updated my files, this particular file doesn't update for the most part, for the code block in question here:

'view' => 
  array (
    'paths' => 
      array (
        0 => 'C:\\laravel_little_smart_website\\resources\\views',
      ),
    'compiled' => 'C:\\laravel_little_smart_website\\storage\\framework\\views',
  ),

They are all pointing to my local setup, so after I change it to point to host folder:

'view' => 
  array (
    'paths' => 
      array (
        0 => '/home/vol14_2/infinityfree.com/if0_37135633/htdocs/resources/views',
      ),
    'compiled' => '/home/vol14_2/infinityfree.com/if0_37135633/htdocs/storage/framework/views',
  ),

It finally works. Infinityfree unable to access command panel is really tedious.

Please or to participate in this conversation.