2018-08-21 10:58:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Webkul\Product\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2019-02-18 07:30:40 +00:00
|
|
|
use Webkul\Customer\Models\CustomerProxy;
|
2018-09-21 13:43:41 +00:00
|
|
|
use Webkul\Product\Models\Product;
|
2019-02-18 07:30:40 +00:00
|
|
|
use Webkul\Product\Contracts\ProductReview as ProductReviewContract;
|
2018-08-21 10:58:55 +00:00
|
|
|
|
2019-02-18 07:30:40 +00:00
|
|
|
class ProductReview extends Model implements ProductReviewContract
|
2018-08-21 10:58:55 +00:00
|
|
|
{
|
2019-02-21 11:06:27 +00:00
|
|
|
protected $fillable = ['comment', 'title', 'rating', 'status', 'product_id', 'customer_id', 'name'];
|
2018-08-30 13:22:15 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the product attribute family that owns the product.
|
|
|
|
|
*/
|
|
|
|
|
public function customer()
|
|
|
|
|
{
|
2019-02-18 07:30:40 +00:00
|
|
|
return $this->belongsTo(CustomerProxy::modelClass());
|
2018-08-30 13:22:15 +00:00
|
|
|
}
|
2018-09-21 13:43:41 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the product.
|
|
|
|
|
*/
|
|
|
|
|
public function product()
|
|
|
|
|
{
|
2019-02-18 07:30:40 +00:00
|
|
|
return $this->belongsTo(ProductProxy::modelClass());
|
2018-09-21 13:43:41 +00:00
|
|
|
}
|
2018-08-21 10:58:55 +00:00
|
|
|
}
|