Edit File: Review.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Review extends Model { use HasFactory; protected $fillable = ['rate','order_id','store_id','seconduser_id','showOrhide','product_id' , 'comment','user_id']; public function user(){ return $this->belongsTo(User::class)->withTrashed(); } public function store(){ return $this->belongsTo(User::class,'store_id'); } public function secondUser(){ return $this->belongsTo(User::class,'seconduser_id'); } }
Back to File Manager