Files
snipe-it/app/models/Model.php
T
2013-11-25 12:39:47 -05:00

32 lines
487 B
PHP

<?php
class Model extends Elegant {
// Declare the rules for the form validation
protected $rules = array(
'name' => 'required|min:3',
);
public function assets()
{
return $this->hasMany('Asset', 'model_id');
}
public function category()
{
return $this->belongsTo('Category', 'category_id');
}
public function depreciation()
{
return $this->belongsTo('Depreciation','id');
}
public function adminuser()
{
return $this->belongsTo('User','user_id');
}
}