Laravel 5.8 changing the controller only after the composer upgrade. As it should be?

Learning laravel, faced with the problem of displaying information on the pages through controllers.

In the file web.php route for the page
Route::get('/', 'IndexController@index');

The controller has 2 methods: index (main) and hello (test).
After changing the method refreshes the page and... nothing happens. The changes are only applied after the command "composer upgrade".

Here watch the video lessons and can't understand what's wrong.
run php artisan serve.

web.php
Route::get('/', 'IndexController@index');

Contents IndexController
<?php

namespace App\Http\Controllers;
use Illuminate\Http\Request;

use App\News_Posts;

class IndexController extends Controller
{

 public function index() {

 $news = 'news It's title';
 return view('home_page.home_page')->with('news', $news);

}

 public function hello(){
 $news = 'It's news hello title';
 return view('home_page.home_page')->with('news', $news);
}

}


The problem is that without the composer command upgrade changes web.php not applicable.
For example you need to change the controller method index
Route::get('/', 'IndexController@index');

for the method hello
Route::get('/', 'IndexController@index');

After saving need to go to the console and perform the update
March 19th 20 at 08:55
1 answer
March 19th 20 at 08:57
Little information... Where is the code?
Added a little - Libby.Shiel commented on March 19th 20 at 09:00
php artisan route:clear did? - verna.Nicolas commented on March 19th 20 at 09:03
@Libby.Shiel, I don't know... Delete the project and try to update all the dependencies composer globally ( including laravel) and try again. - bette commented on March 19th 20 at 09:06
@verna.Nicolas, no. It helped, thanks! - Libby.Shiel commented on March 19th 20 at 09:09

Find more questions by tags Laravel