initial commit
This commit is contained in:
34
src/Models/Laravel5/Person.php
Normal file
34
src/Models/Laravel5/Person.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace XaiCorp\AbcParser\Models\Laravel5;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model as BaseModel;
|
||||
use XaiCorp\AbcParser\Traits\ValidationTrait;
|
||||
|
||||
class Person extends BaseModel
|
||||
{
|
||||
use ValidationTrait;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'persons';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['name', 'email'];
|
||||
|
||||
protected $hidden = ['email'];
|
||||
|
||||
//Relationships
|
||||
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user