<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Service extends Model
{
    protected $table = 'services';
    protected $primaryKey = 'id';
    protected $fillable = [
        'header',
        'description',
        'image',
        'active_status',
    ];
    protected $hidden = [
        'created_at',
        'updated_at'
    ];

    public function serviceList() {
        return $this->hasMany('App\Models\ServiceQusAns', 'service_id', 'id')->select('id','service_id', 'qus','ans')->where('active_status', 1);
    }
}
