38 lines
634 B
PHP
38 lines
634 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Respondent extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
/**
|
|
* The attributes that should be mutated to dates.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $dates = [
|
|
'updated_at',
|
|
'created_at',
|
|
'deleted_at'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'handphone',
|
|
'email',
|
|
'gender',
|
|
'occupation',
|
|
'birthdate',
|
|
'category_id'
|
|
];
|
|
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(Category::class);
|
|
}
|
|
}
|