-1

my website run correctly at localhost but when i upload it on CPanel it makes a mistake and say me view index not found

InvalidArgumentException View [index] not found.

this is my Route Code:

Route::get('/', function () {
    return view('index');
});

Also i executed these commands:

php artisan config:cache
php artisan config: clear
php artisan view:clear
composer update
php artisan route:clear

but it have no response!!!!!

6
  • maybe it is because of routing. please show your code Commented Jul 22, 2018 at 12:37
  • Route::get('/', function () { return view('index'); }); Commented Jul 22, 2018 at 12:40
  • try using controller for rendering view it is standard,and check it Commented Jul 22, 2018 at 12:45
  • it didn't work ): Commented Jul 22, 2018 at 12:52
  • Did you put your view file in correct directory and name it correctly? Commented Jul 22, 2018 at 12:54

4 Answers 4

1

What's your resources/views directory's permission? It should accessible by your web server.

Sign up to request clarification or add additional context in comments.

1 Comment

all folders are 755 and all files are 644
0

You should try : php artisan cache:clear

Comments

0

If these commands work:

 php artisan config:cache or php artisan
 config:clear?
 named your view correctly with yourview.blade.php?
 placed the view correctly in the resources\views?

Maybe the problem is that your server is not setting up properly because the domain doesnt connected properly to your VPS. Contact the hosting provider.

1 Comment

this issue is for all of my views but when i return json or string instead of view it will work
0

i solved it, i upload new project and it solved but i don't know what is the issue of last project. It's so weird

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.