<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use DB;

class RenewalInsurance extends Model{
    use HasFactory;
    protected $table = 'renewal_insurance';
    
    protected $fillable = [
        'ri_obf_ins_id',
        'ri_date_of_insurance',
        'ri_time_of_insurance',
        'ri_last_time_of_insurance',
        'ri_company_name',
        'ri_ncb_amount',
        'ri_policy_number',
        'ri_remarks',
        'status',
        'created_by',
        'created_at',
        'updated_by',
        'updated_at'
    ];

    /*public function export($slug){
        $collection = DB::table('accessories')
                        ->select('name', 'type', 'price', 'hsn_number', 'model_number', 'model_type', 'warranty', 'status');

        if($slug != 'all')
            $collection->where(['status' => $slug]);
        
        $data = $collection->get();
        
        if($data->isNotEmpty()){
            return $data;
        }else{
            return null;
        }
    }*/
}
