<?php

namespace App;
use DB;

use Illuminate\Database\Eloquent\Model;

class Subcategory extends Model
{
    public $table='subcategory';
    protected $fillable=['cat_id','subcategorynm'];


public static function getsubcatnm($id)
    {

   $result=DB::table('subcategory')->where('id',$id)->pluck('subcategorynm') ; 
   //dd($result);
    return $result[0];

    }



}
