2014-06-29 15:12:33 -05:00
|
|
|
<?php
|
2014-12-06 05:12:55 -06:00
|
|
|
use Watson\Validating\ValidatingTrait;
|
2014-12-20 08:00:53 -06:00
|
|
|
use \Illuminate\Database\Eloquent\Model as Eloquent;
|
2014-12-13 14:59:02 -06:00
|
|
|
/**
|
|
|
|
* Class Component
|
|
|
|
*/
|
2014-12-17 13:47:46 -06:00
|
|
|
class Component extends Eloquent
|
2014-06-29 15:12:33 -05:00
|
|
|
{
|
2014-07-05 12:44:26 -05:00
|
|
|
|
2014-07-05 09:19:15 -05:00
|
|
|
public static $rules
|
2014-11-18 02:47:50 -06:00
|
|
|
= [
|
|
|
|
'user_id' => 'exists:users,id|required',
|
|
|
|
'name' => 'required|between:1,100|alphabasic',
|
|
|
|
'class' => 'required',
|
|
|
|
];
|
2014-12-06 05:12:55 -06:00
|
|
|
protected $dates = ['deleted_at', 'created_at', 'updated_at'];
|
2014-12-17 13:47:46 -06:00
|
|
|
protected $fillable = ['name', 'user_id','class'];
|
2014-11-12 15:37:44 -06:00
|
|
|
protected $table = 'components';
|
2014-12-16 14:41:16 -06:00
|
|
|
use ValidatingTrait;
|
2015-01-01 23:16:49 -06:00
|
|
|
}
|