?
Current File : /home/sanghavirealty/public_html/appazwer/Livewire/Rate.php
<?php

namespace App\Livewire;

use App\Models\Rating;
use Livewire\Component;

class Rate extends Component
{
    public $postId;
    public $ratingvalue ;
    public $clientIP;

    protected $listeners = ['ratingAdded' => 'updateRating'];


    public function updateRating () {

        $clientIP = \Request::ip();

   Rating::livewireRatingInsert($this->ratingvalue,$this->postId,$clientIP);

 
        
        session()->flash('message', 'Comment successfully updated.');
   

    }



    public function render()
    {
        return view('livewire.rate');
    }

    
}