<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class UIT extends Model
{
    protected $table = 'uit';

    protected $dates = ['created_at','updated_at'];

    protected $fillable = [
        'anio',
        'valor',
        'base_legal',
    ];

    public function uit()
    {
        return UIT::select(
            'id',
            'anio',
            'valor',
            'base_legal');
    }

//    public function cant_asistentes()
//    {
//        return count($this->hasMany('App\Model\Menu','id_evento'));
//    }

    // this is a recommended way to declare event handlers
    protected static function boot() {
        parent::boot();

        static::deleting(function($user) { // before delete() method call this
            // do the rest of the cleanup...
        });
    }
}
