title: Call to a member function notify() on integer in LARAVEL 5.8
body: <p>I am working on a task schedule. The flow is I need to send notification as a reminder for their duedate.</p>
  
  <p>here's my <strong>console\command\remindDuedate</strong></p>
  
  <pre><code>class remindDuedate extends Command
  {
      protected $signature = 'remindDuedate:run';   
      protected $description = 'Command description';    
      public function __construct()
      {
          parent::__construct();
      }    
      public function handle()
      {
          while (true) {
              $loanapplications = LoanApplication::where('archive',false)-&gt;where('status','=',2)-&gt;get();          
  
              foreach ($loanapplications as $application) {
  
                  $user = $application-&gt;user_id;
  
                  $date_approval = Carbon::createFromTimestamp(strtotime($application-&gt;date_approval));
  
                  $duration = $application-&gt;loanDuration-&gt;num_days;
                  $duedate_warning = $duration-3;
  
                  $reminder_date = $date_approval-&gt;addDays($duedate_warning)-&gt;toDateString();
  
                  $now = Carbon::now('Asia/Manila')-&gt;toDateString();
                  $duedate = Carbon::now('Asia/Manila')-&gt;addDays(3)-&gt;toDateString();
  
                  if($reminder_date == $now) {
  
                      $user-&gt;notify(new remindDuedateNotif());
                  }
              }           
          }
      }
  }
  </code></pre>
  
  <p><strong>php artisan remindDuedate:run</strong></p>
  
  <p><a href="https://i.stack.imgur.com/MdnUv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MdnUv.png" alt="enter image description here"></a></p>
  
  <p><strong>remindDuedateNotif</strong></p>
  
  <p><a href="https://i.stack.imgur.com/fYmgJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fYmgJ.png" alt="enter image description here"></a></p>
  
  <p>Why do I getting the "Call to a member function notify() on integer" </p>
  
  <p>Thank you in advance!</p>