pavlen's avatar

Laravel link route to wrong view

Hi,

get very wierd situation,all works fine,and last time I try one link from my menu,see that routes link to wrong view.

Here is route:

Route::get('main', 'TestController@index');

In controller is this for return:

    public function index(){    
        
         $pagination = Test::latest()->paginate(10);
        
            
         return view('orders.index',compact('pagination')); 
    } 

All was fine,but now,when go to

mysite/main, go to totaly diferent view?

Any idea ?

Tnx, P

0 likes
4 replies
bobbybouwmann's avatar

What view is being called? Also it might be that your view is cached, you can remove the cache by running

php artisan view:clear
pavlen's avatar

@bobbybouwmann

hi,

I think this comand is for Laravel 5.1 ,I use 5.0...

There are no commands defined in the "view" namespace.

The view that show is from other folder caled :

resource/views/email/index.blade.php

bobbybouwmann's avatar

Are you sure the path to the view is correct and that the content of that view is unique as well? This shouldn't be happening at all!

pavlen's avatar

@bobbybouwmann

All is ok and everuthing work fine for couple of weeks, that is wierd for me :)

I will try to check all...

Tnx !

Please or to participate in this conversation.