<?php

namespace DMZ\Models;

use Illuminate\Database\Eloquent\Model;

class Fotos extends Model
{
  protected $table ='fotos';
  public $fillable = [
    'album_id',
	'title',
	'description',
	'file',
	'size',
	'type',
	'hits',
	'publish_up',
	'status',
	'created_by',
	'updated_by'
  ];
  public $timestamps = true;

  public function scopeGetFotos($query){
        return $query->select('fotos.*') 
                     ->orderBy('publish_up', 'desc')
                     ->orderBy('created_at', 'desc');
  }
}
