I am a laravel beginner using the following: version 9.31.0 - macbook computer and composer however, @yield is not working when I'm using it in my code and I can't tell why. I tried changing the name of the content and using @endsection / @stop, but nothing seems to make it work.
no error is showing only the code is not working.
test.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>your user ID is: {{$userId}}</h1>
<div>
@yield('contentTest')
</div>
</body>
</html>
taskContent.blade.php
@extends('test')
@section('contentTest')
<p>this is the test content yield</p>
@endsection