<?php

namespace DMZ\Models;

use Illuminate\Database\Eloquent\Model;

class Image extends Model

{
  protected $table ='files';
  public $fillable = [
      'id',
      'file',
      'created_at',
      'updated_at',
      'status',
      'name',
      'description',
      'hits',
      'created_by',
      'updated_by',
      'content_id'
  ];
  public $timestamps = true;

  public static $rules = [
      'file' => 'required|mimes:png,gif,jpeg,jpg,bmp'
  ];

  public static $messages = [
      'file.mimes' => 'Uploaded file is not in image format',
      'file.required' => 'Image is required'
  ];

}
