You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/app/Feedback.php

28 lines
536 B

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Appended\Traites\GetDateAttributesTrait;
class Feedback extends Model
{
use GetDateAttributesTrait;
protected $fillable = ['text','rate'];
protected $table = 'feedbacks';
public function feedbackable()
{
return $this->morphTo();
}
public function author()
{
/// Select ID , Name , ProfilePhoto
/// Change By Saleh
return $this->belongsTo('App\User','author_id')->select(['id','name']);
}
}