Vincen
Vincen

Reputation: 119

Laravel: Error InvalidArgumentException

I' upload the project from localhost to my dedicated server and after so many problems, finally some pages works domain.com | domain.com/home | domain.com/allsites etc..

But now, the routes "domain.com/site/create" "domain.com/site/ID/manage", "domain.com/site/ID/edit" not found, i get this error, why?

InvalidArgumentException in FileViewFinder.php line 137: View [Site.create] not found.

in FileViewFinder.php line 137 at
FileViewFinder->findInPaths('Site.create',
array('/....../resources/views')) in FileViewFinder.php line 79 at
FileViewFinder->find('Site.create') in Factory.php line 151

I try artisan comands: cache:clear, route:clear, config:clear, config:cache and nothings works, i don't know where is the problem!

On localhost it works perfectly

Upvotes: 10

Views: 59736

Answers (6)

Arifur Rahman
Arifur Rahman

Reputation: 1

in my case, I write the Controller's name with a Caps letter. Route::**C**ontroller(ProductsController::class)->group(function(){ Route::get('/','index')->name('home'); }); I just update name as Route::controller(ProductsController::class)->group(function(){ Route::get('/','index')->name('home'); }); and now it works great.

Upvotes: 0

kinjal 123
kinjal 123

Reputation: 1

check you passed argument are in database fields or not!

 $mailData = array(
                    'type' => 'email_subscription',
                    'user_mail' => $obj->email_id
                );
                
                Mail::to($request->input('email'))->send(new SendMail($mailData));

Upvotes: 0

Mugoma J. Okomba
Mugoma J. Okomba

Reputation: 3295

I had same issue but cause was different. For me the problem was permissions on errors folder. In particular the folder was not executable.

To resolve on linux:

$ chmod +x ../views/errors

Upvotes: 2

Try one of these commands:

php artisan dump-autoload or composer dump-autoload

Upvotes: 0

iSensical
iSensical

Reputation: 757

also multiple times its found that config cache being problem. Use following commands to finetune them.

php artisan config:cache
php artisan config:clear

Upvotes: 15

Haz Pro
Haz Pro

Reputation: 216

If your local OS is different from your production server OS you might be running into a case-sensitive issue and the file is not being found. make sure your files names are EXACTLY the same, case and all. This can happen especially if one environment is Mac and the other is Linux.

If the issue is not fixed, please go through the following link. It may help you

Laravel 5 - View [home] not found

Laravel 5.1 View not found

Laravel 5 InvalidArgumentException in FileViewFinder.php line 137: View [.admin] not found

Upvotes: 14

Related Questions