mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -06:00
21 lines
606 B
PHP
21 lines
606 B
PHP
<?php
|
|
use Watson\Validating\ValidatingTrait;
|
|
use \Illuminate\Database\Eloquent\Model as Eloquent;
|
|
/**
|
|
* Class Component
|
|
*/
|
|
class Component extends Eloquent
|
|
{
|
|
|
|
public static $rules
|
|
= [
|
|
'user_id' => 'exists:users,id|required',
|
|
'name' => 'required|between:1,100|alphabasic',
|
|
'class' => 'required',
|
|
];
|
|
protected $dates = ['deleted_at', 'created_at', 'updated_at'];
|
|
protected $fillable = ['name', 'user_id','class'];
|
|
protected $table = 'components';
|
|
use ValidatingTrait;
|
|
}
|