<?php

namespace DMZ\Models;

use Illuminate\Database\Eloquent\Model;

class Categories extends Model
{
  protected $table ='categories';
  public $fillable = [
    'created_by',
    'updated_by',
    'created_by_alias',
    'publish_up',
    'publish_down',
    'status',
    'version',
    'ordering',
    'access',
    'hits',
    'tags',
    'featured',
    'language',
    'images',
    'category',
    'slug',
    'description'
  ];
  public $timestamps = true;

  public function scopeGetCategories($query){
    return $query->where('status',1)->lists('category','id', 'category' );
  }

}
