Answer the question
In order to leave comments, you need to log in
Laravel 5.8 only changes controller after composer upgrade. Is that how it should be?
I'm learning laravel, I ran into a problem with displaying information on pages through controllers.
In the web.php file, the route for the page Route::get('/', '[email protected]');
. There are 2 methods in the controller: index (main) and hello (test).
After changing the method, I refresh the page and ... nothing happens. Changes are only applied after the "composer upgrade" command.
I'm watching video tutorials and I can't figure out what's wrong.
php artisan serve is running.
web.php IndexController Route::get('/', '[email protected]');
content
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\News_Posts;
class IndexController extends Controller
{
public function index() {
$news = 'It`s title news';
return view('home_page.home_page')->with('news', $news);
}
public function hello(){
$news = 'It`s title news hello';
return view('home_page.home_page')->with('news', $news);
}
}
Route::get('/', '[email protected]');
Route::get('/', '[email protected]');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question