Files
abcParser/src/Models/Laravel5/Person.php
2017-10-06 22:32:31 -04:00

38 lines
660 B
PHP

<?php
namespace XaiCorp\AbcParser\Models\Laravel5;
class Person extends ValidatingModel
{
use UuidTrait;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'persons';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name', 'email'];
protected $validationRules = [
'id' => 'required',
'name' => 'required|string|max:63',
'email' => 'required|email|max:255'
];
protected $hidden = ['email'];
//Relationships
public function toArray()
{
return $this->name;
}
}