Files
gsf/app/Models/Testimonial.php
vedant-chavan 20f55281ef save to codehub
2024-08-09 17:11:41 +05:30

31 lines
669 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\TestimonialImages;
class Testimonial extends Model
{
use HasFactory;
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $table = 'testimonials';
protected $fillable = [
'user_name',
'image',
'title',
'description',
'rating',
'is_active'
];
public function testimonial_data(){
return $this->hasMany(TestimonialImages::class,'testimonial_id','id');
}
}