1e4071b51d
Conflicts: app/models/Asset.php It looks like the same time I pulled depreciation out of the Asset class, uploads were being added in. It doesn't look like a conflict to me, but git couldn't figure it out. Oh Well.
21 lines
502 B
PHP
Executable File
21 lines
502 B
PHP
Executable File
<?php
|
|
|
|
class Depreciation extends Elegant
|
|
{
|
|
// Declare the rules for the form validation
|
|
protected $rules = array(
|
|
'name' => 'required|alpha_space|min:3|max:255|unique:depreciations,name,{id}',
|
|
'months' => 'required|min:1|max:240|integer',
|
|
);
|
|
|
|
public function has_models()
|
|
{
|
|
return $this->hasMany('Model', 'depreciation_id')->count();
|
|
}
|
|
|
|
public function has_licenses()
|
|
{
|
|
return $this->hasMany('License','depreciation_id')->count();
|
|
}
|
|
}
|