title: Can I pass variables to blade from Observer in Laravel?
body: <p>I want to send variables to the navigation blade from Observer in Laravel.
  What I actually want to do is showing badges on the navigation bar every time created new model data.
  I made a variable in the created function in the event observer and want to pass it to the navigation blade.</p>
  <p>so I tried like below.</p>
  <pre><code>      public function created(QnaNonmember $qnaNonmember)
      {
          $qna_new = 1;
          return $this-&gt;view('partials.navigation')-&gt;with(compact('qna_new'));
      }
  </code></pre>
  <p>But in the navigation, it causes an error like below.</p>
  <pre><code>Undefined variable: qna_new
  </code></pre>
  <p>How can I do this in the right way?</p>