openstamanager/src/Models/View.php

28 lines
491 B
PHP
Raw Normal View History

<?php
namespace Models;
2018-12-29 12:03:22 +01:00
use Common\Model;
class View extends Model
{
protected $table = 'zz_views';
public function getQueryAttribute($value)
{
2019-02-01 17:44:31 +01:00
return Util\Query::replacePlaceholder($value);
}
/* Relazioni Eloquent */
public function groups()
{
return $this->belongsToMany(Group::class, 'zz_group_view', 'id_vista', 'id_gruppo');
}
public function module()
{
return $this->belongsTo(Module::class, 'id_module');
}
}