File Manager Lite
Dir:
/home/codewavebd/public_html/app/Models
Upload
[..]
Category.php (466 B)
Edit
Rename
Del
Faq.php (597 B)
Edit
Rename
Del
Edit: Faq.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Faq extends Model { use HasFactory; protected $fillable = [ 'question', 'answer', 'type', 'relation_id', 'order', 'status' ]; public function service() { return $this->belongsTo(Service::class, 'relation_id')->where('type', 'service'); } public function software() { return $this->belongsTo(SoftwareProduct::class, 'relation_id')->where('type', 'software'); } }
Simpan