<?php
namespace App;
use Illuminate\Database\Eloquent\Model;

class Media extends Model {

	protected $table = 'media';
	protected $fillable = array('title','upimage', 'category', 'description');
    public static $validators = array(
        'title'   => 'required|min:3',
        'upimage'  => 'required|image',
        'description'  => 'required|min:6');

    public function categories(){
		return $this->hasMany('App\Categories');
	}
}
