title: Laravel, calling controller method from blade template file
body: <p>Heey guys! I use Laravel 5.4, WAMP for localhost. I am struggling with the problem to call a <code>Controller@methodName</code> within my <code>header.blade.php</code> file, because I want to show in my header.blade.php file all notifications for the User.  Normally I was getting all needed data with the help of routes in different pages. But for this case I need to call without using routes. Here is my code for my <code>NotificationController</code>:</p>
  
  <pre><code>class NotificationController extends Controller
  {   
    public function getNotification(){
      $notifications = Notification::where('user_id',Auth::user()-&gt;id)-&gt;get();
      $unread=0;
  
      foreach($notifications as $notify){
          if($notify-&gt;seen==0)$unread++;
      }
  
      return ['notifications'=&gt;$notifications, 'unread'=&gt;$unread];
    }
  }
  </code></pre>
  
  <p>And I should receive all these data in my header file. I have used:  <strong>{{App::make("NotificationController")->getNotification()}}</strong>
  and <strong>{{NotificationController::getNotification() }}</strong> But it says <code>Class NotificationController does not exist</code>. Please heelp!</p>