title: laravel $title is undefined Make the variable optional in the blade template. Replace {{ $title }} with {{ $title ?? '' }}
body: <p><a href="https://i.stack.imgur.com/qIf0t.png" rel="nofollow noreferrer"><code>$title is undefined Make the variable optional in the blade template. Replace {{ $title }} with {{ $title ?? '' }}</code></a></p>
  <p>index.blade.php is working</p>
  <pre><code>@extends('layouts.app')
  
  @section('content')
  
    {{ $title }}
    
  @endsection
  </code></pre>
  <p>but the about and service not working with the same code .
  in my PageController.php</p>
  <pre><code>    public function index(){
          $title = 'welcome hiii';
          return view('pages.index')-&gt;with('title', $title);
      }
  
      public function about(){
          $title = 'welcome hiiissssssss';
          return view('pages.about')-&gt;with('title', $title);
      }
  
      public function services(){
          $data = array(
              'title' =&gt; 'services'
          );
          return view('pages.services')-&gt;with($data);
      }
  
  </code></pre>