<?php
namespace App\model;
use Illuminate\Database\Eloquent\Model;
class Productcomment extends Model
{
//
protected $appends = ['UserInfo'];
public function getUserInfoAttribute()
{
$Productcomments = Productcomment::
where('shop_id', $this->id)->
get();
if ($Userinfo = Customer:: where('id', $this->Customer_id)->first())
return $Userinfo;
else return 0 ;
}
}