Cześć! Mam widok welcome, gdzie link, któy jak klikne to powinien przenosić do widoku hello i wyświetlać tekst "Witaj na stronie". Szukam błedu i nie moge znaleŹĆ, moze ktos pomoze, bo dopiero zaczynam sie uczyc laravela.
plik welcome.blade.php
<body class="antialiased">
<a href="{{ url('/hello') }}">Druga strona</a>
</body>
plik hello.blade.php
<body>
@isset($hello)
<h2>{{ $hello }}</h2>
@endisset
<a href="{{ url('/') }}">Wróć na główną</a>
</body>
plik ArticleController.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ArticleController extends Controller
{
public function index()
{
return view("hello")->with("hello", "Witaj na stronie!");
}
}
plik web.php
Route::get('/', function () {
return view('welcome');
});
Route::get('/hello', 'ArticleController@index');