<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Sancio extends Model
{
    protected $table = 'sancio';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['id', 'matricula', 'tramitada'];
    /**
     * The attributes that should be mutated to dates.
     *
     * @var array
     */
    protected $dates = ['data_tramit'];
    //per desactivar camps a la taula update at i created at
    public $timestamps = false;

    /** Obtenir id d'acces sancionat
     * @param $dataAcces
     * @return mixed
     */
    public function getSancioAccesId($dataAcces){
        //comprobar format hora
        return $this->where('id_acces', $dataAcces)->get();
    }
}
