title: laravel call to undefined method app\models\User:id()
body: <p>I have been trying to create a point system, so after much effort  i am getting this error which i could not figure out how to solve it because this is my first time working so deep</p>
  <p>I have checked code but couldn't pinpoint the error</p>
  <blockquote>
  <p>call to undefined app\models\User:id()</p>
  </blockquote>
  <p>point model</p>
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  use Illuminate\Database\Eloquent\Factories\HasFactory;
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\Relations\MorphTo;
  
  class Point extends Model
  {
      use HasFactory;
      const TABLE = 'points';
      protected $table = self::TABLE;
  
      protected $fillable = [
        'id', 'amount', 'message', 'current_points'
      ];
  
      public function pointable(): MorphTo
      {
          return $this-&gt;morphTo();
      }
  
      public function getCurrentPoints(Model $pointable)
      {
          $currentPoints = Point::where('pointable_id', $pointable-&gt;id())
          -&gt;where('pointable_type', $pointable-&gt;getMorphClass())
          -&gt;orderBy('created_at', 'desc')
          -&gt;pluck('current_points')-&gt;first();
  
          if($currentPoints){
              $currentPoints = 0;
          }
  
          return $currentPoints;
      }
  
      public function addAwards(Model $pointable, $amount, $message)
      {
          $award = new Static();
          $award-&gt;amount = $amount;
          $award-&gt;current_points = $this-&gt;getCurrentPoints($pointable) + $amount;
          $award-&gt;message = $message
  
          $pointable-&gt;awards()-&gt;save($award);
  
          return $award;
      }
  }
  
  
  </code></pre>
  <p>pointable model</p>
  <pre><code>&lt;?php
  
  namespace App\Models;
  
  interface pointable
  {
      public function awards();
  
      public function countAwards();
  
      public function addPoints($amount, $message);
  }
  
  </code></pre>
  <p>hasPoints Traits</p>
  <pre><code>
  &lt;?php
  
  namespace App\Traits;
  
  use App\Models\Point;
  
  trait HasPoints
  {
      public function awards($amount = null)
      {
         return $this-&gt;morphMany(Point::class, 'pointable')
         -&gt;orderBy('created_at', 'desc')
         -&gt;take($amount);
      }
  
      public function countAwards()
      {
          return $this-&gt;awards()-&gt;count();
      }
  
      public function currentPoints()
      {
          return (new Point())-&gt;getCurrentPoints($this);
  
      }
  
      public function addPoints($amount, $message)
      {
          return (new Point())-&gt;addAwards($this, $amount, $message);
      }
  }
  </code></pre>
  <p>AwardPointLItener</p>
  <pre><code>?php
  
  namespace App\Listeners;
  
  
  use App\Events\ReplyWasCreated;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class AwardPointForNewReply
  {
      public function handle(ReplyWasCreated $event)
      {
          $amount = config('points.rewards.new_reply');
          $message = 'User Created A New Reply';
  
          $author = $event-&gt;reply-&gt;user;
          $author-&gt;addPoints($amount, $message);
      }
  }
  </code></pre>
  <p>ReplyEvent</p>
  <pre><code>
  &lt;?php
  
  namespace App\Events;
  
  use App\Models\Reply as Replyers;
  use Illuminate\Queue\SerializesModels;
  
  class ReplyWasCreated
  {
      use SerializesModels;
  
      public $reply;
  
      public function __construct(Replyers $reply)
      {
          $this-&gt;reply = $reply;
      }
  
  }
  </code></pre>
  <p>livewire reply componet</p>
  <pre><code>use Livewire\Component;
  use App\Models\Reply as Replys;
  
  class Reply extends Component
  {
  
      public $thread;
      public $username;
      public $reply_text;
      public $replyCommentId = NULL;
  
      protected $rules = [
          'reply_text' =&gt; 'required'
      ];
  
      public function mount(Thread $thread)
      {
           $this-&gt;thread = $thread;
      }
  
  
      public function render()
      {
  
          $replys = Replys::whereNull('parent_id')
              -&gt;with('replies')
              -&gt;with('user')
              -&gt;where('thread_id', $this-&gt;thread-&gt;id)-&gt;paginate()-&gt;withQueryString();
              return view('livewire.thread.reply',[
                  'replys' =&gt; $replys,
              ]);
      }
  
      public function save_reply()
      {
          $this-&gt;validate();
  
         $replyevent = Replys::create([
              'thread_id' =&gt; $this-&gt;thread-&gt;id,
              'user_id' =&gt; auth()-&gt;user()-&gt;id,
              'reply_text' =&gt; $this-&gt;reply_text,
              'parent_id' =&gt; $this-&gt;replyCommentId
          ]);
  
          event(new ReplyWasCreated($replyevent));
  
          // $this-&gt;username = '';
          $this-&gt;reply_text = '';
          $this-&gt;replyCommentId = NULL;
      }
  
      public function deleteReply($id)
      {
          $reply = Replys::FindOrFail($id);
          $reply-&gt;delete();
      }
  
      public function replys($replyId)
      {
          $this-&gt;replyCommentId = $replyId;
      }
  
  }
  </code></pre>